Class Attachment.Builder (0.36.0)
Stay organized with collections
Save and categorize content based on your preferences.
publicstaticfinalclass Attachment.BuilderextendsGeneratedMessageV3.Builder<Attachment.Builder>implementsAttachmentOrBuilderAn attachment in Google Chat.
Protobuf type google.chat.v1.Attachment
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Attachment.BuilderImplements
AttachmentOrBuilderInherited Members
Static Methods
getDescriptor()
publicstaticfinalDescriptors.DescriptorgetDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
publicAttachment.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
build()
publicAttachmentbuild()| Returns | |
|---|---|
| Type | Description |
Attachment |
|
buildPartial()
publicAttachmentbuildPartial()| Returns | |
|---|---|
| Type | Description |
Attachment |
|
clear()
publicAttachment.Builderclear()| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
clearAttachmentDataRef()
publicAttachment.BuilderclearAttachmentDataRef()Optional. A reference to the attachment data. This field is used to create or update messages with attachments, or with the media API to download the attachment data.
.google.chat.v1.AttachmentDataRef attachment_data_ref = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
clearContentName()
publicAttachment.BuilderclearContentName()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()
publicAttachment.BuilderclearContentType()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()
publicAttachment.BuilderclearDataRef()| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
clearDownloadUri()
publicAttachment.BuilderclearDownloadUri()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()
publicAttachment.BuilderclearDriveDataRef()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)
publicAttachment.BuilderclearField(Descriptors.FieldDescriptorfield)| Parameter | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
clearName()
publicAttachment.BuilderclearName() Optional. Resource name of the attachment, in the form
spaces/{space}/messages/{message}/attachments/{attachment}.
string name = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
publicAttachment.BuilderclearOneof(Descriptors.OneofDescriptoroneof)| Parameter | |
|---|---|
| Name | Description |
oneof |
OneofDescriptor |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
clearSource()
publicAttachment.BuilderclearSource()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()
publicAttachment.BuilderclearThumbnailUri()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()
publicAttachment.Builderclone()| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
getAttachmentDataRef()
publicAttachmentDataRefgetAttachmentDataRef()Optional. A reference to the attachment data. This field is used to create or update messages with attachments, or with the media API to download the attachment data.
.google.chat.v1.AttachmentDataRef attachment_data_ref = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
AttachmentDataRef |
The attachmentDataRef. |
getAttachmentDataRefBuilder()
publicAttachmentDataRef.BuildergetAttachmentDataRefBuilder()Optional. A reference to the attachment data. This field is used to create or update messages with attachments, or with the media API to download the attachment data.
.google.chat.v1.AttachmentDataRef attachment_data_ref = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
AttachmentDataRef.Builder |
|
getAttachmentDataRefOrBuilder()
publicAttachmentDataRefOrBuildergetAttachmentDataRefOrBuilder()Optional. A reference to the attachment data. This field is used to create or update messages with attachments, or with the media API to download the attachment data.
.google.chat.v1.AttachmentDataRef attachment_data_ref = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
AttachmentDataRefOrBuilder |
|
getContentName()
publicStringgetContentName()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()
publicByteStringgetContentNameBytes()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()
publicStringgetContentType()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()
publicByteStringgetContentTypeBytes()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()
publicAttachment.DataRefCasegetDataRefCase()| Returns | |
|---|---|
| Type | Description |
Attachment.DataRefCase |
|
getDefaultInstanceForType()
publicAttachmentgetDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
Attachment |
|
getDescriptorForType()
publicDescriptors.DescriptorgetDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getDownloadUri()
publicStringgetDownloadUri()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()
publicByteStringgetDownloadUriBytes()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()
publicDriveDataRefgetDriveDataRef()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()
publicDriveDataRef.BuildergetDriveDataRefBuilder()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()
publicDriveDataRefOrBuildergetDriveDataRefOrBuilder()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()
publicStringgetName() Optional. Resource name of the attachment, in the form
spaces/{space}/messages/{message}/attachments/{attachment}.
string name = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
String |
The name. |
getNameBytes()
publicByteStringgetNameBytes() Optional. Resource name of the attachment, in the form
spaces/{space}/messages/{message}/attachments/{attachment}.
string name = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for name. |
getSource()
publicAttachment.SourcegetSource()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()
publicintgetSourceValue()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()
publicStringgetThumbnailUri()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()
publicByteStringgetThumbnailUriBytes()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()
publicbooleanhasAttachmentDataRef()Optional. A reference to the attachment data. This field is used to create or update messages with attachments, or with the media API to download the attachment data.
.google.chat.v1.AttachmentDataRef attachment_data_ref = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the attachmentDataRef field is set. |
hasDriveDataRef()
publicbooleanhasDriveDataRef()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()
protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
publicfinalbooleanisInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeAttachmentDataRef(AttachmentDataRef value)
publicAttachment.BuildermergeAttachmentDataRef(AttachmentDataRefvalue)Optional. A reference to the attachment data. This field is used to create or update messages with attachments, or with the media API to download the attachment data.
.google.chat.v1.AttachmentDataRef attachment_data_ref = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
AttachmentDataRef |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
mergeDriveDataRef(DriveDataRef value)
publicAttachment.BuildermergeDriveDataRef(DriveDataRefvalue)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)
publicAttachment.BuildermergeFrom(Attachmentother)| Parameter | |
|---|---|
| Name | Description |
other |
Attachment |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
publicAttachment.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
publicAttachment.BuildermergeFrom(Messageother)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
mergeUnknownFields(UnknownFieldSet unknownFields)
publicfinalAttachment.BuildermergeUnknownFields(UnknownFieldSetunknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
setAttachmentDataRef(AttachmentDataRef value)
publicAttachment.BuildersetAttachmentDataRef(AttachmentDataRefvalue)Optional. A reference to the attachment data. This field is used to create or update messages with attachments, or with the media API to download the attachment data.
.google.chat.v1.AttachmentDataRef attachment_data_ref = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
AttachmentDataRef |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
setAttachmentDataRef(AttachmentDataRef.Builder builderForValue)
publicAttachment.BuildersetAttachmentDataRef(AttachmentDataRef.BuilderbuilderForValue)Optional. A reference to the attachment data. This field is used to create or update messages with attachments, or with the media API to download the attachment data.
.google.chat.v1.AttachmentDataRef attachment_data_ref = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
AttachmentDataRef.Builder |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
setContentName(String value)
publicAttachment.BuildersetContentName(Stringvalue)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 |
String The contentName to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setContentNameBytes(ByteString value)
publicAttachment.BuildersetContentNameBytes(ByteStringvalue)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 |
ByteString The bytes for contentName to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setContentType(String value)
publicAttachment.BuildersetContentType(Stringvalue)Output only. The content type (MIME type) of the file.
string content_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
String The contentType to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setContentTypeBytes(ByteString value)
publicAttachment.BuildersetContentTypeBytes(ByteStringvalue)Output only. The content type (MIME type) of the file.
string content_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteString The bytes for contentType to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setDownloadUri(String value)
publicAttachment.BuildersetDownloadUri(Stringvalue)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 |
String The downloadUri to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setDownloadUriBytes(ByteString value)
publicAttachment.BuildersetDownloadUriBytes(ByteStringvalue)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 |
ByteString The bytes for downloadUri to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setDriveDataRef(DriveDataRef value)
publicAttachment.BuildersetDriveDataRef(DriveDataRefvalue)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)
publicAttachment.BuildersetDriveDataRef(DriveDataRef.BuilderbuilderForValue)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)
publicAttachment.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
setName(String value)
publicAttachment.BuildersetName(Stringvalue) Optional. Resource name of the attachment, in the form
spaces/{space}/messages/{message}/attachments/{attachment}.
string name = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
String The name to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setNameBytes(ByteString value)
publicAttachment.BuildersetNameBytes(ByteStringvalue) Optional. Resource name of the attachment, in the form
spaces/{space}/messages/{message}/attachments/{attachment}.
string name = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteString The bytes for name to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
publicAttachment.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|
setSource(Attachment.Source value)
publicAttachment.BuildersetSource(Attachment.Sourcevalue)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.Source The source to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setSourceValue(int value)
publicAttachment.BuildersetSourceValue(intvalue)Output only. The source of the attachment.
.google.chat.v1.Attachment.Source source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
int The enum numeric value on the wire for source to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setThumbnailUri(String value)
publicAttachment.BuildersetThumbnailUri(Stringvalue)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 |
String The thumbnailUri to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setThumbnailUriBytes(ByteString value)
publicAttachment.BuildersetThumbnailUriBytes(ByteStringvalue)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 |
ByteString The bytes for thumbnailUri to set. |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
publicfinalAttachment.BuildersetUnknownFields(UnknownFieldSetunknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
Attachment.Builder |
|