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 data of an attachment.
-
#content_name ⇒ String
The original file name for the content, not the full path.
-
#content_type ⇒ String
The content type (MIME type) of the file.
-
#download_uri ⇒ String
Output only.
-
#drive_data_ref ⇒ Google::Apis::ChatV1::DriveDataRef
A reference to the data of a drive attachment.
-
#name ⇒ String
Resource name of the attachment, in the form "spaces//messages//attachments/* ".
-
#source ⇒ String
The source of the attachment.
-
#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.
212 213 214 |
# File 'lib/google/apis/chat_v1/classes.rb', line 212 def initialize(**args) update!(**args) end |
Instance Attribute Details
#attachment_data_ref ⇒ Google::Apis::ChatV1::AttachmentDataRef
A reference to the data of an attachment.
Corresponds to the JSON property attachmentDataRef
170 171 172 |
# File 'lib/google/apis/chat_v1/classes.rb', line 170 def @attachment_data_ref end |
#content_name ⇒ String
The original file name for the content, not the full path.
Corresponds to the JSON property contentName
175 176 177 |
# File 'lib/google/apis/chat_v1/classes.rb', line 175 def content_name @content_name end |
#content_type ⇒ String
The content type (MIME type) of the file.
Corresponds to the JSON property contentType
180 181 182 |
# File 'lib/google/apis/chat_v1/classes.rb', line 180 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 should not use this URL to download
attachment content.
Corresponds to the JSON property downloadUri
187 188 189 |
# File 'lib/google/apis/chat_v1/classes.rb', line 187 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
192 193 194 |
# File 'lib/google/apis/chat_v1/classes.rb', line 192 def drive_data_ref @drive_data_ref end |
#name ⇒ String
Resource name of the attachment, in the form "spaces//messages//attachments/*
".
Corresponds to the JSON property name
198 199 200 |
# File 'lib/google/apis/chat_v1/classes.rb', line 198 def name @name end |
#source ⇒ String
The source of the attachment.
Corresponds to the JSON property source
203 204 205 |
# File 'lib/google/apis/chat_v1/classes.rb', line 203 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 should not use this URL to download attachment
content.
Corresponds to the JSON property thumbnailUri
210 211 212 |
# File 'lib/google/apis/chat_v1/classes.rb', line 210 def thumbnail_uri @thumbnail_uri end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
217 218 219 220 221 222 223 224 225 226 |
# File 'lib/google/apis/chat_v1/classes.rb', line 217 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 |