Interface AttachmentOrBuilder (0.21.0)

publicinterface AttachmentOrBuilderextendsMessageOrBuilder

Implements

MessageOrBuilder

Methods

getAttachmentDataRef()

publicabstractAttachmentDataRefgetAttachmentDataRef()

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.

getAttachmentDataRefOrBuilder()

publicabstractAttachmentDataRefOrBuildergetAttachmentDataRefOrBuilder()

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()

publicabstractStringgetContentName()

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()

publicabstractByteStringgetContentNameBytes()

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()

publicabstractStringgetContentType()

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()

publicabstractByteStringgetContentTypeBytes()

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()

publicabstractAttachment.DataRefCasegetDataRefCase()
Returns
Type Description
Attachment.DataRefCase

getDownloadUri()

publicabstractStringgetDownloadUri()

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()

publicabstractByteStringgetDownloadUriBytes()

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()

publicabstractDriveDataRefgetDriveDataRef()

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.

getDriveDataRefOrBuilder()

publicabstractDriveDataRefOrBuildergetDriveDataRefOrBuilder()

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()

publicabstractStringgetName()

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()

publicabstractByteStringgetNameBytes()

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()

publicabstractAttachment.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()

publicabstractintgetSourceValue()

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()

publicabstractStringgetThumbnailUri()

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()

publicabstractByteStringgetThumbnailUriBytes()

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()

publicabstractbooleanhasAttachmentDataRef()

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()

publicabstractbooleanhasDriveDataRef()

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.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.