Class Attachment (0.15.0)

  public 
  
 final 
  
 class 
 Attachment 
  
 extends 
  
 GeneratedMessageV3 
  
 implements 
  
 AttachmentOrBuilder 
 

An attachment in Google Chat.

Protobuf type google.chat.v1.Attachment

Implements

AttachmentOrBuilder

Static Fields

ATTACHMENT_DATA_REF_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 ATTACHMENT_DATA_REF_FIELD_NUMBER 
 
Field Value
Type
Description
int

CONTENT_NAME_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 CONTENT_NAME_FIELD_NUMBER 
 
Field Value
Type
Description
int

CONTENT_TYPE_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 CONTENT_TYPE_FIELD_NUMBER 
 
Field Value
Type
Description
int

DOWNLOAD_URI_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 DOWNLOAD_URI_FIELD_NUMBER 
 
Field Value
Type
Description
int

DRIVE_DATA_REF_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 DRIVE_DATA_REF_FIELD_NUMBER 
 
Field Value
Type
Description
int

NAME_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 NAME_FIELD_NUMBER 
 
Field Value
Type
Description
int

SOURCE_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 SOURCE_FIELD_NUMBER 
 
Field Value
Type
Description
int

THUMBNAIL_URI_FIELD_NUMBER

  public 
  
 static 
  
 final 
  
 int 
  
 THUMBNAIL_URI_FIELD_NUMBER 
 
Field Value
Type
Description
int

Static Methods

getDefaultInstance()

  public 
  
 static 
  
 Attachment 
  
 getDefaultInstance 
 () 
 
Returns
Type
Description

getDescriptor()

  public 
  
 static 
  
 final 
  
 Descriptors 
 . 
 Descriptor 
  
 getDescriptor 
 () 
 
Returns
Type
Description

newBuilder()

  public 
  
 static 
  
 Attachment 
 . 
 Builder 
  
 newBuilder 
 () 
 
Returns
Type
Description

newBuilder(Attachment prototype)

  public 
  
 static 
  
 Attachment 
 . 
 Builder 
  
 newBuilder 
 ( 
 Attachment 
  
 prototype 
 ) 
 
Parameter
Name
Description
prototype
Returns
Type
Description

parseDelimitedFrom(InputStream input)

  public 
  
 static 
  
 Attachment 
  
 parseDelimitedFrom 
 ( 
 InputStream 
  
 input 
 ) 
 
Parameter
Name
Description
input
Returns
Type
Description
Exceptions
Type
Description

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Attachment 
  
 parseDelimitedFrom 
 ( 
 InputStream 
  
 input 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
input
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(byte[] data)

  public 
  
 static 
  
 Attachment 
  
 parseFrom 
 ( 
 byte 
 [] 
  
 data 
 ) 
 
Parameter
Name
Description
data
byte []
Returns
Type
Description
Exceptions
Type
Description

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Attachment 
  
 parseFrom 
 ( 
 byte 
 [] 
  
 data 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
data
byte []
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(ByteString data)

  public 
  
 static 
  
 Attachment 
  
 parseFrom 
 ( 
 ByteString 
  
 data 
 ) 
 
Parameter
Name
Description
data
Returns
Type
Description
Exceptions
Type
Description

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Attachment 
  
 parseFrom 
 ( 
 ByteString 
  
 data 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
data
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(CodedInputStream input)

  public 
  
 static 
  
 Attachment 
  
 parseFrom 
 ( 
 CodedInputStream 
  
 input 
 ) 
 
Parameter
Name
Description
Returns
Type
Description
Exceptions
Type
Description

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Attachment 
  
 parseFrom 
 ( 
 CodedInputStream 
  
 input 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(InputStream input)

  public 
  
 static 
  
 Attachment 
  
 parseFrom 
 ( 
 InputStream 
  
 input 
 ) 
 
Parameter
Name
Description
input
Returns
Type
Description
Exceptions
Type
Description

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Attachment 
  
 parseFrom 
 ( 
 InputStream 
  
 input 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
input
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parseFrom(ByteBuffer data)

  public 
  
 static 
  
 Attachment 
  
 parseFrom 
 ( 
 ByteBuffer 
  
 data 
 ) 
 
Parameter
Name
Description
data
Returns
Type
Description
Exceptions
Type
Description

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

  public 
  
 static 
  
 Attachment 
  
 parseFrom 
 ( 
 ByteBuffer 
  
 data 
 , 
  
 ExtensionRegistryLite 
  
 extensionRegistry 
 ) 
 
Parameters
Name
Description
data
extensionRegistry
Returns
Type
Description
Exceptions
Type
Description

parser()

  public 
  
 static 
  
 Parser<Attachment> 
  
 parser 
 () 
 
Returns
Type
Description

Methods

equals(Object obj)

  public 
  
 boolean 
  
 equals 
 ( 
 Object 
  
 obj 
 ) 
 
Parameter
Name
Description
obj
Returns
Type
Description
Overrides

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

The attachmentDataRef.

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

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

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

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

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

The bytes for contentType.

getDataRefCase()

  public 
  
 Attachment 
 . 
 DataRefCase 
  
 getDataRefCase 
 () 
 
Returns
Type
Description

getDefaultInstanceForType()

  public 
  
 Attachment 
  
 getDefaultInstanceForType 
 () 
 
Returns
Type
Description

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

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

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

The driveDataRef.

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

getName()

  public 
  
 String 
  
 getName 
 () 
 

Resource name of the attachment, in the form spaces/{space}/messages/{message}/attachments/{attachment} .

string name = 1;

Returns
Type
Description

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

The bytes for name.

getParserForType()

  public 
  
 Parser<Attachment> 
  
 getParserForType 
 () 
 
Returns
Type
Description
Overrides

getSerializedSize()

  public 
  
 int 
  
 getSerializedSize 
 () 
 
Returns
Type
Description
int
Overrides

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

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

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

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

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

Whether the driveDataRef field is set.

hashCode()

  public 
  
 int 
  
 hashCode 
 () 
 
Returns
Type
Description
int
Overrides

internalGetFieldAccessorTable()

  protected 
  
 GeneratedMessageV3 
 . 
 FieldAccessorTable 
  
 internalGetFieldAccessorTable 
 () 
 
Returns
Type
Description
Overrides

isInitialized()

  public 
  
 final 
  
 boolean 
  
 isInitialized 
 () 
 
Returns
Type
Description
Overrides

newBuilderForType()

  public 
  
 Attachment 
 . 
 Builder 
  
 newBuilderForType 
 () 
 
Returns
Type
Description

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

  protected 
  
 Attachment 
 . 
 Builder 
  
 newBuilderForType 
 ( 
 GeneratedMessageV3 
 . 
 BuilderParent 
  
 parent 
 ) 
 
Parameter
Name
Description
parent
Returns
Type
Description
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

  protected 
  
 Object 
  
 newInstance 
 ( 
 GeneratedMessageV3 
 . 
 UnusedPrivateParameter 
  
 unused 
 ) 
 
Parameter
Name
Description
Returns
Type
Description
Overrides

toBuilder()

  public 
  
 Attachment 
 . 
 Builder 
  
 toBuilder 
 () 
 
Returns
Type
Description

writeTo(CodedOutputStream output)

  public 
  
 void 
  
 writeTo 
 ( 
 CodedOutputStream 
  
 output 
 ) 
 
Parameter
Name
Description
Overrides
Exceptions
Type
Description
Design a Mobile Site
View Site in Mobile | Classic
Share by: