Class: Google::Apis::ChatV1::Attachment

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Attachment

Returns a new instance of Attachment.



301
302
303
# File 'lib/google/apis/chat_v1/classes.rb', line 301

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#attachment_data_refGoogle::Apis::ChatV1::AttachmentDataRef

A reference to the attachment data. Corresponds to the JSON property attachmentDataRef



259
260
261
# File 'lib/google/apis/chat_v1/classes.rb', line 259

def attachment_data_ref
  @attachment_data_ref
end

#content_nameString

Output only. The original file name for the content, not the full path. Corresponds to the JSON property contentName

Returns:

  • (String)


264
265
266
# File 'lib/google/apis/chat_v1/classes.rb', line 264

def content_name
  @content_name
end

#content_typeString

Output only. The content type (MIME type) of the file. Corresponds to the JSON property contentType

Returns:

  • (String)


269
270
271
# File 'lib/google/apis/chat_v1/classes.rb', line 269

def content_type
  @content_type
end

#download_uriString

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

Returns:

  • (String)


276
277
278
# File 'lib/google/apis/chat_v1/classes.rb', line 276

def download_uri
  @download_uri
end

#drive_data_refGoogle::Apis::ChatV1::DriveDataRef

A reference to the data of a drive attachment. Corresponds to the JSON property driveDataRef



281
282
283
# File 'lib/google/apis/chat_v1/classes.rb', line 281

def drive_data_ref
  @drive_data_ref
end

#nameString

Resource name of the attachment, in the form spaces/space/messages/message /attachments/attachment`. Corresponds to the JSON propertyname`

Returns:

  • (String)


287
288
289
# File 'lib/google/apis/chat_v1/classes.rb', line 287

def name
  @name
end

#sourceString

Output only. The source of the attachment. Corresponds to the JSON property source

Returns:

  • (String)


292
293
294
# File 'lib/google/apis/chat_v1/classes.rb', line 292

def source
  @source
end

#thumbnail_uriString

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

Returns:

  • (String)


299
300
301
# File 'lib/google/apis/chat_v1/classes.rb', line 299

def thumbnail_uri
  @thumbnail_uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



306
307
308
309
310
311
312
313
314
315
# File 'lib/google/apis/chat_v1/classes.rb', line 306

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