Reference documentation and code samples for the Google Cloud Support V2 Client class 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 themedia.downloadendpoint.
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.
Generated from protobuf messagegoogle.cloud.support.v2.Attachment
Namespace
Google \ Cloud \ Support \ V2
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Output only. Identifier. The resource name of the attachment.
[[["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-09-04 UTC."],[],[],null,["# Google Cloud Support V2 Client - Class Attachment (1.2.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.1 (latest)](/php/docs/reference/cloud-support/latest/V2.Attachment)\n- [1.2.0](/php/docs/reference/cloud-support/1.2.0/V2.Attachment)\n- [1.1.0](/php/docs/reference/cloud-support/1.1.0/V2.Attachment)\n- [1.0.3](/php/docs/reference/cloud-support/1.0.3/V2.Attachment)\n- [0.2.5](/php/docs/reference/cloud-support/0.2.5/V2.Attachment)\n- [0.1.2](/php/docs/reference/cloud-support/0.1.2/V2.Attachment) \nReference documentation and code samples for the Google Cloud Support V2 Client class 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\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\nGenerated from protobuf message `google.cloud.support.v2.Attachment`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Support \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nOutput only. Identifier. The resource name of the attachment.\n\n### setName\n\nOutput only. Identifier. The resource name of the attachment.\n\n### getCreateTime\n\nOutput only. The time at which the attachment was created.\n\n### hasCreateTime\n\n### clearCreateTime\n\n### setCreateTime\n\nOutput only. The time at which the attachment was created.\n\n### getCreator\n\nOutput only. The user who uploaded the attachment. Note, the name and email\nwill be obfuscated if the attachment was uploaded by Google support.\n\n### hasCreator\n\n### clearCreator\n\n### setCreator\n\nOutput only. The user who uploaded the attachment. Note, the name and email\nwill be obfuscated if the attachment was uploaded by Google support.\n\n### getFilename\n\nThe filename of the attachment (e.g. `\"graph.jpg\"`).\n\n### setFilename\n\nThe filename of the attachment (e.g. `\"graph.jpg\"`).\n\n### getMimeType\n\nOutput only. The MIME type of the attachment (e.g. text/plain).\n\n### setMimeType\n\nOutput only. The MIME type of the attachment (e.g. text/plain).\n\n### getSizeBytes\n\nOutput only. The size of the attachment in bytes.\n\n### setSizeBytes\n\nOutput only. The size of the attachment in bytes."]]