Reference documentation and code samples for the Google Cloud Support V2 API class Google::Cloud::Support::V2::Attachment.
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.
(::Google::Cloud::Support::V2::Actor) — Output only. The user who uploaded the attachment. Note, the name and email
will be obfuscated if the attachment was uploaded by Google support.
#filename
deffilename()->::String
Returns
(::String) — The filename of the attachment (e.g. "graph.jpg").
#filename=
deffilename=(value)->::String
Parameter
value (::String) — The filename of the attachment (e.g. "graph.jpg").
Returns
(::String) — The filename of the attachment (e.g. "graph.jpg").
#mime_type
defmime_type()->::String
Returns
(::String) — Output only. The MIME type of the attachment (e.g. text/plain).
#name
defname()->::String
Returns
(::String) — Output only. Identifier. The resource name of the attachment.
#size_bytes
defsize_bytes()->::Integer
Returns
(::Integer) — Output only. The size of the attachment in bytes.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Google Cloud Support V2 API - Class Google::Cloud::Support::V2::Attachment (v1.4.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.4.1 (latest)](/ruby/docs/reference/google-cloud-support-v2/latest/Google-Cloud-Support-V2-Attachment)\n- [1.4.0](/ruby/docs/reference/google-cloud-support-v2/1.4.0/Google-Cloud-Support-V2-Attachment)\n- [1.3.0](/ruby/docs/reference/google-cloud-support-v2/1.3.0/Google-Cloud-Support-V2-Attachment)\n- [1.2.1](/ruby/docs/reference/google-cloud-support-v2/1.2.1/Google-Cloud-Support-V2-Attachment)\n- [1.1.0](/ruby/docs/reference/google-cloud-support-v2/1.1.0/Google-Cloud-Support-V2-Attachment)\n- [1.0.1](/ruby/docs/reference/google-cloud-support-v2/1.0.1/Google-Cloud-Support-V2-Attachment)\n- [0.4.0](/ruby/docs/reference/google-cloud-support-v2/0.4.0/Google-Cloud-Support-V2-Attachment)\n- [0.3.2](/ruby/docs/reference/google-cloud-support-v2/0.3.2/Google-Cloud-Support-V2-Attachment)\n- [0.2.0](/ruby/docs/reference/google-cloud-support-v2/0.2.0/Google-Cloud-Support-V2-Attachment)\n- [0.1.0](/ruby/docs/reference/google-cloud-support-v2/0.1.0/Google-Cloud-Support-V2-Attachment) \nReference documentation and code samples for the Google Cloud Support V2 API class Google::Cloud::Support::V2::Attachment.\n\nAn Attachment contains metadata about a file that was uploaded to a\ncase - it is NOT a file itself. That being said, the name of an Attachment\nobject can be used to download its accompanying file through the\n`media.download` endpoint.\n\n\n\u003cbr /\u003e\n\nWhile attachments can be uploaded in the console at the\nsame time as a comment, they're associated on a \"case\" level, not a\n\"comment\" level. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #create_time\n\n def create_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Output only. The time at which the attachment was created.\n\n### #creator\n\n def creator() -\u003e ::Google::Cloud::Support::V2::Actor\n\n**Returns**\n\n- ([::Google::Cloud::Support::V2::Actor](./Google-Cloud-Support-V2-Actor)) --- Output only. The user who uploaded the attachment. Note, the name and email will be obfuscated if the attachment was uploaded by Google support.\n\n### #filename\n\n def filename() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The filename of the attachment (e.g. `\"graph.jpg\"`).\n\n### #filename=\n\n def filename=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- The filename of the attachment (e.g. `\"graph.jpg\"`). \n**Returns**\n\n- (::String) --- The filename of the attachment (e.g. `\"graph.jpg\"`).\n\n### #mime_type\n\n def mime_type() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Output only. The MIME type of the attachment (e.g. text/plain).\n\n### #name\n\n def name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Output only. Identifier. The resource name of the attachment.\n\n### #size_bytes\n\n def size_bytes() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- Output only. The size of the attachment in bytes."]]