public static final class Attachment.Builder extends GeneratedMessageV3.Builder<Attachment.Builder> implements AttachmentOrBuilderAn attachment in Google Chat.
Protobuf type google.chat.v1.Attachment
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Attachment.BuilderImplements
AttachmentOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Attachment.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
build()
public Attachment build()| Returns | |
|---|---|
| Type | Description |
Attachment |
|
buildPartial()
public Attachment buildPartial()| Returns | |
|---|---|
| Type | Description |
Attachment |
|
clear()
public Attachment.Builder clear()| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
clearAttachmentDataRef()
public Attachment.Builder clearAttachmentDataRef()A reference to the attachment data. This field is used with the media API to download the attachment data.
.google.chat.v1.AttachmentDataRef attachment_data_ref = 4;
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
clearContentName()
public Attachment.Builder clearContentName()Output only. The original file name for the content, not the full path.
string content_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
clearContentType()
public Attachment.Builder clearContentType()Output only. The content type (MIME type) of the file.
string content_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
clearDataRef()
public Attachment.Builder clearDataRef()| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
clearDownloadUri()
public Attachment.Builder clearDownloadUri()Output only. The download URL which should be used to allow a human user to download the attachment. Chat apps shouldn't use this URL to download attachment content.
string download_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
clearDriveDataRef()
public Attachment.Builder clearDriveDataRef()Output only. A reference to the Google Drive attachment. This field is used with the Google Drive API.
.google.chat.v1.DriveDataRef drive_data_ref = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
clearField(Descriptors.FieldDescriptor field)
public Attachment.Builder clearField(Descriptors.FieldDescriptor field)| Parameter | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
clearName()
public Attachment.Builder clearName() Resource name of the attachment, in the form
spaces/{space}/messages/{message}/attachments/{attachment}.
string name = 1;
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public Attachment.Builder clearOneof(Descriptors.OneofDescriptor oneof)| Parameter | |
|---|---|
| Name | Description |
oneof |
OneofDescriptor |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
clearSource()
public Attachment.Builder clearSource()Output only. The source of the attachment.
.google.chat.v1.Attachment.Source source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
clearThumbnailUri()
public Attachment.Builder clearThumbnailUri()Output only. The thumbnail URL which should be used to preview the attachment to a human user. Chat apps shouldn't use this URL to download attachment content.
string thumbnail_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
clone()
public Attachment.Builder clone()| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
getAttachmentDataRef()
public AttachmentDataRef getAttachmentDataRef()A reference to the attachment data. This field is used with the media API to download the attachment data.
.google.chat.v1.AttachmentDataRef attachment_data_ref = 4;
| Returns | |
|---|---|
| Type | Description |
AttachmentDataRef |
The attachmentDataRef. |
getAttachmentDataRefBuilder()
public AttachmentDataRef.Builder getAttachmentDataRefBuilder()A reference to the attachment data. This field is used with the media API to download the attachment data.
.google.chat.v1.AttachmentDataRef attachment_data_ref = 4;
| Returns | |
|---|---|
| Type | Description |
AttachmentDataRef.Builder |
|
getAttachmentDataRefOrBuilder()
public AttachmentDataRefOrBuilder getAttachmentDataRefOrBuilder()A reference to the attachment data. This field is used with the media API to download the attachment data.
.google.chat.v1.AttachmentDataRef attachment_data_ref = 4;
| Returns | |
|---|---|
| Type | Description |
AttachmentDataRefOrBuilder |
|
getContentName()
public String getContentName()Output only. The original file name for the content, not the full path.
string content_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
String |
The contentName. |
getContentNameBytes()
public ByteString getContentNameBytes()Output only. The original file name for the content, not the full path.
string content_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for contentName. |
getContentType()
public String getContentType()Output only. The content type (MIME type) of the file.
string content_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
String |
The contentType. |
getContentTypeBytes()
public ByteString getContentTypeBytes()Output only. The content type (MIME type) of the file.
string content_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for contentType. |
getDataRefCase()
public Attachment.DataRefCase getDataRefCase()| Returns | |
|---|---|
| Type | Description |
Attachment.DataRefCase |
|
getDefaultInstanceForType()
public Attachment getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
Attachment |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getDownloadUri()
public String getDownloadUri()Output only. The download URL which should be used to allow a human user to download the attachment. Chat apps shouldn't use this URL to download attachment content.
string download_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
String |
The downloadUri. |
getDownloadUriBytes()
public ByteString getDownloadUriBytes()Output only. The download URL which should be used to allow a human user to download the attachment. Chat apps shouldn't use this URL to download attachment content.
string download_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for downloadUri. |
getDriveDataRef()
public DriveDataRef getDriveDataRef()Output only. A reference to the Google Drive attachment. This field is used with the Google Drive API.
.google.chat.v1.DriveDataRef drive_data_ref = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
DriveDataRef |
The driveDataRef. |
getDriveDataRefBuilder()
public DriveDataRef.Builder getDriveDataRefBuilder()Output only. A reference to the Google Drive attachment. This field is used with the Google Drive API.
.google.chat.v1.DriveDataRef drive_data_ref = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
DriveDataRef.Builder |
|
getDriveDataRefOrBuilder()
public DriveDataRefOrBuilder getDriveDataRefOrBuilder()Output only. A reference to the Google Drive attachment. This field is used with the Google Drive API.
.google.chat.v1.DriveDataRef drive_data_ref = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
DriveDataRefOrBuilder |
|
getName()
public String getName() Resource name of the attachment, in the form
spaces/{space}/messages/{message}/attachments/{attachment}.
string name = 1;
| Returns | |
|---|---|
| Type | Description |
String |
The name. |
getNameBytes()
public ByteString getNameBytes() Resource name of the attachment, in the form
spaces/{space}/messages/{message}/attachments/{attachment}.
string name = 1;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for name. |
getSource()
public Attachment.Source getSource()Output only. The source of the attachment.
.google.chat.v1.Attachment.Source source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
Attachment.Source |
The source. |
getSourceValue()
public int getSourceValue()Output only. The source of the attachment.
.google.chat.v1.Attachment.Source source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
int |
The enum numeric value on the wire for source. |
getThumbnailUri()
public String getThumbnailUri()Output only. The thumbnail URL which should be used to preview the attachment to a human user. Chat apps shouldn't use this URL to download attachment content.
string thumbnail_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
String |
The thumbnailUri. |
getThumbnailUriBytes()
public ByteString getThumbnailUriBytes()Output only. The thumbnail URL which should be used to preview the attachment to a human user. Chat apps shouldn't use this URL to download attachment content.
string thumbnail_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for thumbnailUri. |
hasAttachmentDataRef()
public boolean hasAttachmentDataRef()A reference to the attachment data. This field is used with the media API to download the attachment data.
.google.chat.v1.AttachmentDataRef attachment_data_ref = 4;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the attachmentDataRef field is set. |
hasDriveDataRef()
public boolean hasDriveDataRef()Output only. A reference to the Google Drive attachment. This field is used with the Google Drive API.
.google.chat.v1.DriveDataRef drive_data_ref = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the driveDataRef field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeAttachmentDataRef(AttachmentDataRef value)
public Attachment.Builder mergeAttachmentDataRef(AttachmentDataRef value)A reference to the attachment data. This field is used with the media API to download the attachment data.
.google.chat.v1.AttachmentDataRef attachment_data_ref = 4;
| Parameter | |
|---|---|
| Name | Description |
value |
AttachmentDataRef |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
mergeDriveDataRef(DriveDataRef value)
public Attachment.Builder mergeDriveDataRef(DriveDataRef value)Output only. A reference to the Google Drive attachment. This field is used with the Google Drive API.
.google.chat.v1.DriveDataRef drive_data_ref = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
DriveDataRef |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
mergeFrom(Attachment other)
public Attachment.Builder mergeFrom(Attachment other)| Parameter | |
|---|---|
| Name | Description |
other |
Attachment |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Attachment.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public Attachment.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Attachment.Builder mergeUnknownFields(UnknownFieldSet unknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
setAttachmentDataRef(AttachmentDataRef value)
public Attachment.Builder setAttachmentDataRef(AttachmentDataRef value)A reference to the attachment data. This field is used with the media API to download the attachment data.
.google.chat.v1.AttachmentDataRef attachment_data_ref = 4;
| Parameter | |
|---|---|
| Name | Description |
value |
AttachmentDataRef |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
setAttachmentDataRef(AttachmentDataRef.Builder builderForValue)
public Attachment.Builder setAttachmentDataRef(AttachmentDataRef.Builder builderForValue)A reference to the attachment data. This field is used with the media API to download the attachment data.
.google.chat.v1.AttachmentDataRef attachment_data_ref = 4;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
AttachmentDataRef.Builder |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
setContentName(String value)
public Attachment.Builder setContentName(String value)Output only. The original file name for the content, not the full path.
string content_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe contentName to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setContentNameBytes(ByteString value)
public Attachment.Builder setContentNameBytes(ByteString value)Output only. The original file name for the content, not the full path.
string content_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for contentName to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setContentType(String value)
public Attachment.Builder setContentType(String value)Output only. The content type (MIME type) of the file.
string content_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe contentType to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setContentTypeBytes(ByteString value)
public Attachment.Builder setContentTypeBytes(ByteString value)Output only. The content type (MIME type) of the file.
string content_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for contentType to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setDownloadUri(String value)
public Attachment.Builder setDownloadUri(String value)Output only. The download URL which should be used to allow a human user to download the attachment. Chat apps shouldn't use this URL to download attachment content.
string download_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe downloadUri to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setDownloadUriBytes(ByteString value)
public Attachment.Builder setDownloadUriBytes(ByteString value)Output only. The download URL which should be used to allow a human user to download the attachment. Chat apps shouldn't use this URL to download attachment content.
string download_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for downloadUri to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setDriveDataRef(DriveDataRef value)
public Attachment.Builder setDriveDataRef(DriveDataRef value)Output only. A reference to the Google Drive attachment. This field is used with the Google Drive API.
.google.chat.v1.DriveDataRef drive_data_ref = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
DriveDataRef |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
setDriveDataRef(DriveDataRef.Builder builderForValue)
public Attachment.Builder setDriveDataRef(DriveDataRef.Builder builderForValue)Output only. A reference to the Google Drive attachment. This field is used with the Google Drive API.
.google.chat.v1.DriveDataRef drive_data_ref = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
DriveDataRef.Builder |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
setField(Descriptors.FieldDescriptor field, Object value)
public Attachment.Builder setField(Descriptors.FieldDescriptor field, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
setName(String value)
public Attachment.Builder setName(String value) Resource name of the attachment, in the form
spaces/{space}/messages/{message}/attachments/{attachment}.
string name = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe name to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setNameBytes(ByteString value)
public Attachment.Builder setNameBytes(ByteString value) Resource name of the attachment, in the form
spaces/{space}/messages/{message}/attachments/{attachment}.
string name = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for name to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Attachment.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
setSource(Attachment.Source value)
public Attachment.Builder setSource(Attachment.Source value)Output only. The source of the attachment.
.google.chat.v1.Attachment.Source source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
Attachment.SourceThe source to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setSourceValue(int value)
public Attachment.Builder setSourceValue(int value)Output only. The source of the attachment.
.google.chat.v1.Attachment.Source source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
intThe enum numeric value on the wire for source to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setThumbnailUri(String value)
public Attachment.Builder setThumbnailUri(String value)Output only. The thumbnail URL which should be used to preview the attachment to a human user. Chat apps shouldn't use this URL to download attachment content.
string thumbnail_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe thumbnailUri to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setThumbnailUriBytes(ByteString value)
public Attachment.Builder setThumbnailUriBytes(ByteString value)Output only. The thumbnail URL which should be used to preview the attachment to a human user. Chat apps shouldn't use this URL to download attachment content.
string thumbnail_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for thumbnailUri to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final Attachment.Builder setUnknownFields(UnknownFieldSet unknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|