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

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/chat_v1/classes.rb,
generated/google/apis/chat_v1/representations.rb,
generated/google/apis/chat_v1/representations.rb

Overview

An attachment in Hangouts Chat.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Attachment

Returns a new instance of Attachment.


170
171
172
# File 'generated/google/apis/chat_v1/classes.rb', line 170

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

Instance Attribute Details

#attachment_data_refGoogle::Apis::ChatV1::AttachmentDataRef

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


129
130
131
# File 'generated/google/apis/chat_v1/classes.rb', line 129

def attachment_data_ref
  @attachment_data_ref
end

#content_nameString

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

Returns:

  • (String)

134
135
136
# File 'generated/google/apis/chat_v1/classes.rb', line 134

def content_name
  @content_name
end

#content_typeString

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

Returns:

  • (String)

139
140
141
# File 'generated/google/apis/chat_v1/classes.rb', line 139

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. Bots should not use this URL to download attachment content. Corresponds to the JSON property downloadUri

Returns:

  • (String)

146
147
148
# File 'generated/google/apis/chat_v1/classes.rb', line 146

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


151
152
153
# File 'generated/google/apis/chat_v1/classes.rb', line 151

def drive_data_ref
  @drive_data_ref
end

#nameString

Resource name of the attachment, in the form "spaces//messages//attachments/* ". Corresponds to the JSON property name

Returns:

  • (String)

157
158
159
# File 'generated/google/apis/chat_v1/classes.rb', line 157

def name
  @name
end

#sourceString

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

Returns:

  • (String)

162
163
164
# File 'generated/google/apis/chat_v1/classes.rb', line 162

def source
  @source
end

#thumbnail_uriString

Output only. The thumbnail URL which should be used to preview the attachment to a human user. Bots should not use this URL to download attachment content. Corresponds to the JSON property thumbnailUri

Returns:

  • (String)

168
169
170
# File 'generated/google/apis/chat_v1/classes.rb', line 168

def thumbnail_uri
  @thumbnail_uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


175
176
177
178
179
180
181
182
183
184
# File 'generated/google/apis/chat_v1/classes.rb', line 175

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