Class: Google::Apis::ChatV1::Attachment
- Inherits:
-
Object
- Object
- Google::Apis::ChatV1::Attachment
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/chat_v1/classes.rb,
lib/google/apis/chat_v1/representations.rb,
lib/google/apis/chat_v1/representations.rb
Overview
An attachment in Google Chat.
Instance Attribute Summary collapse
-
#attachment_data_ref ⇒ Google::Apis::ChatV1::AttachmentDataRef
A reference to the attachment data.
-
#content_name ⇒ String
Output only.
-
#content_type ⇒ String
Output only.
-
#download_uri ⇒ String
Output only.
-
#drive_data_ref ⇒ Google::Apis::ChatV1::DriveDataRef
A reference to the data of a drive attachment.
-
#name ⇒ String
Identifier.
-
#source ⇒ String
Output only.
-
#thumbnail_uri ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Attachment
constructor
A new instance of Attachment.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Attachment
Returns a new instance of Attachment.
397 398 399 |
# File 'lib/google/apis/chat_v1/classes.rb', line 397 def initialize(**args) update!(**args) end |
Instance Attribute Details
#attachment_data_ref ⇒ Google::Apis::ChatV1::AttachmentDataRef
A reference to the attachment data.
Corresponds to the JSON property attachmentDataRef
355 356 357 |
# File 'lib/google/apis/chat_v1/classes.rb', line 355 def @attachment_data_ref end |
#content_name ⇒ String
Output only. The original file name for the content, not the full path.
Corresponds to the JSON property contentName
360 361 362 |
# File 'lib/google/apis/chat_v1/classes.rb', line 360 def content_name @content_name end |
#content_type ⇒ String
Output only. The content type (MIME type) of the file.
Corresponds to the JSON property contentType
365 366 367 |
# File 'lib/google/apis/chat_v1/classes.rb', line 365 def content_type @content_type end |
#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.
Corresponds to the JSON property downloadUri
372 373 374 |
# File 'lib/google/apis/chat_v1/classes.rb', line 372 def download_uri @download_uri end |
#drive_data_ref ⇒ Google::Apis::ChatV1::DriveDataRef
A reference to the data of a drive attachment.
Corresponds to the JSON property driveDataRef
377 378 379 |
# File 'lib/google/apis/chat_v1/classes.rb', line 377 def drive_data_ref @drive_data_ref end |
#name ⇒ String
Identifier. Resource name of the attachment. Format: spaces/space/messages/
message/attachments/attachment`.
Corresponds to the JSON propertyname`
383 384 385 |
# File 'lib/google/apis/chat_v1/classes.rb', line 383 def name @name end |
#source ⇒ String
Output only. The source of the attachment.
Corresponds to the JSON property source
388 389 390 |
# File 'lib/google/apis/chat_v1/classes.rb', line 388 def source @source end |
#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.
Corresponds to the JSON property thumbnailUri
395 396 397 |
# File 'lib/google/apis/chat_v1/classes.rb', line 395 def thumbnail_uri @thumbnail_uri end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
402 403 404 405 406 407 408 409 410 411 |
# File 'lib/google/apis/chat_v1/classes.rb', line 402 def update!(**args) @attachment_data_ref = args[:attachment_data_ref] if args.key?(:attachment_data_ref) @content_name = args[:content_name] if args.key?(:content_name) @content_type = args[:content_type] if args.key?(:content_type) @download_uri = args[:download_uri] if args.key?(:download_uri) @drive_data_ref = args[:drive_data_ref] if args.key?(:drive_data_ref) @name = args[:name] if args.key?(:name) @source = args[:source] if args.key?(:source) @thumbnail_uri = args[:thumbnail_uri] if args.key?(:thumbnail_uri) end |