Google Apps Chat V1 Client - Class Attachment (0.1.4)

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

Resource name of the attachment, in the form spaces/*/messages/*/attachments/*.

↳ 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 Google\Apps\Chat\V1\AttachmentDataRef

A reference to the attachment data. This field is used with the media API to download the attachment data.

↳ drive_data_ref Google\Apps\Chat\V1\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

Resource name of the attachment, in the form spaces/*/messages/*/attachments/*.

Returns
Type Description
string

setName

Resource name of the attachment, in the form spaces/*/messages/*/attachments/*.

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

A reference to the attachment data. This field is used with the media API to download the attachment data.

Returns
Type Description
Google\Apps\Chat\V1\AttachmentDataRef|null

hasAttachmentDataRef

setAttachmentDataRef

A reference to the attachment data. This field is used with the media API to download the attachment data.

Parameter
Name Description
var Google\Apps\Chat\V1\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
Google\Apps\Chat\V1\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 Google\Apps\Chat\V1\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