Class: Google::Apis::CloudsupportV2beta::Attachment
- Inherits:
-
Object
- Object
- Google::Apis::CloudsupportV2beta::Attachment
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudsupport_v2beta/classes.rb,
lib/google/apis/cloudsupport_v2beta/representations.rb,
lib/google/apis/cloudsupport_v2beta/representations.rb
Overview
An Attachment contains metadata about a file that was uploaded to a case - it
is NOT a file itself. That being said, the name of an Attachment object can be
used to download its accompanying file through the media.download
endpoint.
While attachments can be uploaded in the console at the same time as a comment,
they're associated on a "case" level, not a "comment" level.
Instance Attribute Summary collapse
-
#create_time ⇒ String
Output only.
-
#creator ⇒ Google::Apis::CloudsupportV2beta::Actor
An Actor represents an entity that performed an action.
-
#filename ⇒ String
The filename of the attachment (e.g.
"graph.jpg"
). -
#mime_type ⇒ String
Output only.
-
#name ⇒ String
Output only.
-
#size_bytes ⇒ Fixnum
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.
114 115 116 |
# File 'lib/google/apis/cloudsupport_v2beta/classes.rb', line 114 def initialize(**args) update!(**args) end |
Instance Attribute Details
#create_time ⇒ String
Output only. The time at which the attachment was created.
Corresponds to the JSON property createTime
85 86 87 |
# File 'lib/google/apis/cloudsupport_v2beta/classes.rb', line 85 def create_time @create_time end |
#creator ⇒ Google::Apis::CloudsupportV2beta::Actor
An Actor represents an entity that performed an action. For example, an actor
could be a user who posted a comment on a support case, a user who uploaded an
attachment, or a service account that created a support case.
Corresponds to the JSON property creator
92 93 94 |
# File 'lib/google/apis/cloudsupport_v2beta/classes.rb', line 92 def creator @creator end |
#filename ⇒ String
The filename of the attachment (e.g. "graph.jpg"
).
Corresponds to the JSON property filename
97 98 99 |
# File 'lib/google/apis/cloudsupport_v2beta/classes.rb', line 97 def filename @filename end |
#mime_type ⇒ String
Output only. The MIME type of the attachment (e.g. text/plain).
Corresponds to the JSON property mimeType
102 103 104 |
# File 'lib/google/apis/cloudsupport_v2beta/classes.rb', line 102 def mime_type @mime_type end |
#name ⇒ String
Output only. The resource name of the attachment.
Corresponds to the JSON property name
107 108 109 |
# File 'lib/google/apis/cloudsupport_v2beta/classes.rb', line 107 def name @name end |
#size_bytes ⇒ Fixnum
Output only. The size of the attachment in bytes.
Corresponds to the JSON property sizeBytes
112 113 114 |
# File 'lib/google/apis/cloudsupport_v2beta/classes.rb', line 112 def size_bytes @size_bytes end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
119 120 121 122 123 124 125 126 |
# File 'lib/google/apis/cloudsupport_v2beta/classes.rb', line 119 def update!(**args) @create_time = args[:create_time] if args.key?(:create_time) @creator = args[:creator] if args.key?(:creator) @filename = args[:filename] if args.key?(:filename) @mime_type = args[:mime_type] if args.key?(:mime_type) @name = args[:name] if args.key?(:name) @size_bytes = args[:size_bytes] if args.key?(:size_bytes) end |