Google Apps Chat V1 Client - Class Attachment (0.7.1)

Reference documentation and code samples for the Google Apps Chat V1 Client class Attachment.

An attachment in Google Chat.

Generated from protobuf message google.chat.v1.Attachment

Namespace

Google \ Apps \ Chat \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

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

↳ content_name string

Output only. The original file name for the content, not the full path.

↳ content_type string

Output only. The content type (MIME type) of the file.

↳ attachment_data_ref AttachmentDataRef

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.

↳ drive_data_ref DriveDataRef

Output only. A reference to the Google Drive attachment. This field is used with the Google Drive API.

↳ thumbnail_uri string

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.

↳ download_uri string

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.

↳ source int

Output only. The source of the attachment.

getName

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

Returns
Type Description
string

setName

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

Parameter
Name Description
var string
Returns
Type Description
$this

getContentName

Output only. The original file name for the content, not the full path.

Returns
Type Description
string

setContentName

Output only. The original file name for the content, not the full path.

Parameter
Name Description
var string
Returns
Type Description
$this

getContentType

Output only. The content type (MIME type) of the file.

Returns
Type Description
string

setContentType

Output only. The content type (MIME type) of the file.

Parameter
Name Description
var string
Returns
Type Description
$this

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.

Returns
Type Description
AttachmentDataRef|null

hasAttachmentDataRef

setAttachmentDataRef

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.

Parameter
Name Description
var AttachmentDataRef
Returns
Type Description
$this

getDriveDataRef

Output only. A reference to the Google Drive attachment. This field is used with the Google Drive API.

Returns
Type Description
DriveDataRef|null

hasDriveDataRef

setDriveDataRef

Output only. A reference to the Google Drive attachment. This field is used with the Google Drive API.

Parameter
Name Description
var DriveDataRef
Returns
Type Description
$this

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.

Returns
Type Description
string

setThumbnailUri

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.

Parameter
Name Description
var string
Returns
Type Description
$this

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.

Returns
Type Description
string

setDownloadUri

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.

Parameter
Name Description
var string
Returns
Type Description
$this

getSource

Output only. The source of the attachment.

Returns
Type Description
int

setSource

Output only. The source of the attachment.

Parameter
Name Description
var int
Returns
Type Description
$this

getDataRef

Returns
Type Description
string