public
final
class
Attachment
extends
GeneratedMessageV3
implements
AttachmentOrBuilder
An attachment in Google Chat.
Protobuf type google.chat.v1.Attachment
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > AttachmentImplements
AttachmentOrBuilderStatic Fields
ATTACHMENT_DATA_REF_FIELD_NUMBER
public
static
final
int
ATTACHMENT_DATA_REF_FIELD_NUMBER
CONTENT_NAME_FIELD_NUMBER
public
static
final
int
CONTENT_NAME_FIELD_NUMBER
CONTENT_TYPE_FIELD_NUMBER
public
static
final
int
CONTENT_TYPE_FIELD_NUMBER
DOWNLOAD_URI_FIELD_NUMBER
public
static
final
int
DOWNLOAD_URI_FIELD_NUMBER
DRIVE_DATA_REF_FIELD_NUMBER
public
static
final
int
DRIVE_DATA_REF_FIELD_NUMBER
NAME_FIELD_NUMBER
public
static
final
int
NAME_FIELD_NUMBER
SOURCE_FIELD_NUMBER
public
static
final
int
SOURCE_FIELD_NUMBER
THUMBNAIL_URI_FIELD_NUMBER
public
static
final
int
THUMBNAIL_URI_FIELD_NUMBER
Static Methods
getDefaultInstance()
public
static
Attachment
getDefaultInstance
()
getDescriptor()
public
static
final
Descriptors
.
Descriptor
getDescriptor
()
newBuilder()
public
static
Attachment
.
Builder
newBuilder
()
newBuilder(Attachment prototype)
public
static
Attachment
.
Builder
newBuilder
(
Attachment
prototype
)
parseDelimitedFrom(InputStream input)
public
static
Attachment
parseDelimitedFrom
(
InputStream
input
)
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public
static
Attachment
parseDelimitedFrom
(
InputStream
input
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(byte[] data)
public
static
Attachment
parseFrom
(
byte
[]
data
)
data
byte
[]
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public
static
Attachment
parseFrom
(
byte
[]
data
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(ByteString data)
public
static
Attachment
parseFrom
(
ByteString
data
)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public
static
Attachment
parseFrom
(
ByteString
data
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(CodedInputStream input)
public
static
Attachment
parseFrom
(
CodedInputStream
input
)
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public
static
Attachment
parseFrom
(
CodedInputStream
input
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(InputStream input)
public
static
Attachment
parseFrom
(
InputStream
input
)
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public
static
Attachment
parseFrom
(
InputStream
input
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(ByteBuffer data)
public
static
Attachment
parseFrom
(
ByteBuffer
data
)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public
static
Attachment
parseFrom
(
ByteBuffer
data
,
ExtensionRegistryLite
extensionRegistry
)
parser()
public
static
Parser<Attachment>
parser
()
Methods
equals(Object obj)
public
boolean
equals
(
Object
obj
)
getAttachmentDataRef()
public
AttachmentDataRef
getAttachmentDataRef
()
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];
getAttachmentDataRefOrBuilder()
public
AttachmentDataRefOrBuilder
getAttachmentDataRefOrBuilder
()
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];
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];
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];
getContentType()
public
String
getContentType
()
Output only. The content type (MIME type) of the file.
string content_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
getContentTypeBytes()
public
ByteString
getContentTypeBytes
()
Output only. The content type (MIME type) of the file.
string content_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
getDataRefCase()
public
Attachment
.
DataRefCase
getDataRefCase
()
getDefaultInstanceForType()
public
Attachment
getDefaultInstanceForType
()
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];
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];
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];
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];
getName()
public
String
getName
()
Optional. Resource name of the attachment, in the form spaces/{space}/messages/{message}/attachments/{attachment}
.
string name = 1 [(.google.api.field_behavior) = OPTIONAL];
getNameBytes()
public
ByteString
getNameBytes
()
Optional. Resource name of the attachment, in the form spaces/{space}/messages/{message}/attachments/{attachment}
.
string name = 1 [(.google.api.field_behavior) = OPTIONAL];
getParserForType()
public
Parser<Attachment>
getParserForType
()
getSerializedSize()
public
int
getSerializedSize
()
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];
getSourceValue()
public
int
getSourceValue
()
Output only. The source of the attachment.
.google.chat.v1.Attachment.Source source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
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];
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];
hasAttachmentDataRef()
public
boolean
hasAttachmentDataRef
()
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];
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];
hashCode()
public
int
hashCode
()
internalGetFieldAccessorTable()
protected
GeneratedMessageV3
.
FieldAccessorTable
internalGetFieldAccessorTable
()
isInitialized()
public
final
boolean
isInitialized
()
newBuilderForType()
public
Attachment
.
Builder
newBuilderForType
()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected
Attachment
.
Builder
newBuilderForType
(
GeneratedMessageV3
.
BuilderParent
parent
)
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected
Object
newInstance
(
GeneratedMessageV3
.
UnusedPrivateParameter
unused
)
toBuilder()
public
Attachment
.
Builder
toBuilder
()
writeTo(CodedOutputStream output)
public
void
writeTo
(
CodedOutputStream
output
)