# Google Cloud Support V2beta Client - Class Attachment (1.6.0)

1.6.0 (latest) 1.5.0 1.4.2 1.3.0 1.2.1 1.1.0 1.0.3 0.2.5 0.1.2

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Cloud Support V2beta 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 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.

Generated from protobuf message `google.cloud.support.v2beta.Attachment`

## Namespace

Google \\ Cloud \\ Support \\ V2beta

## 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. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time at which the attachment was created. |
| `↳ creator` | `https://docs.cloud.google.com/php/docs/reference/cloud-support/latest/V2beta.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` | `string` The filename of the attachment (e.g. `"graph.jpg"`). |
| `↳ mime_type` | `string` Output only. The MIME type of the attachment (e.g. text/plain). |
| `↳ size_bytes` | `int|string` Output only. The size of the attachment in bytes. |

### getName

Output only. Identifier. The resource name of the attachment.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

Output only. Identifier. The resource name of the attachment.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCreateTime

Output only. The time at which the attachment was created.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The time at which the attachment was created.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCreator

Output only. The user who uploaded the attachment. Note, the name and email
will be obfuscated if the attachment was uploaded by Google support.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-support/latest/V2beta.Actor|null` |   |

### hasCreator

### clearCreator

### setCreator

Output only. The user who uploaded the attachment. Note, the name and email
will be obfuscated if the attachment was uploaded by Google support.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-support/latest/V2beta.Actor` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getFilename

The filename of the attachment (e.g. `"graph.jpg"`).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setFilename

The filename of the attachment (e.g. `"graph.jpg"`).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMimeType

Output only. The MIME type of the attachment (e.g. text/plain).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setMimeType

Output only. The MIME type of the attachment (e.g. text/plain).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSizeBytes

Output only. The size of the attachment in bytes.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|string` |   |

### setSizeBytes

Output only. The size of the attachment in bytes.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |