# Google Cloud Storage Batch Operations V1 Client - Class PutMetadata (0.7.0)

0.7.0 (latest) 0.6.0 0.5.0 0.4.0 0.3.1 0.2.1 0.1.2 Reference documentation and code samples for the Google Cloud Storage Batch Operations V1 Client class PutMetadata.

Describes options for object metadata update.

Generated from protobuf message `google.cloud.storagebatchoperations.v1.PutMetadata`

## Namespace

Google \\ Cloud \\ StorageBatchOperations \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ content_disposition` | `string` Optional. Updates objects Content-Disposition fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Refer <https://cloud.google.com/storage/docs/metadata#content-disposition> for additional documentation. |
| `↳ content_encoding` | `string` Optional. Updates objects Content-Encoding fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Refer to documentation in <https://cloud.google.com/storage/docs/metadata#content-encoding>. |
| `↳ content_language` | `string` Optional. Updates objects Content-Language fixed metadata. Refer to ISO 639-1 language codes for typical values of this metadata. Max length 100 characters. Unset values will be ignored. Set empty values to clear the metadata. Refer to documentation in <https://cloud.google.com/storage/docs/metadata#content-language>. |
| `↳ content_type` | `string` Optional. Updates objects Content-Type fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Refer to documentation in <https://cloud.google.com/storage/docs/metadata#content-type> |
| `↳ cache_control` | `string` Optional. Updates objects Cache-Control fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Additionally, the value for Custom-Time cannot decrease. Refer to documentation in <https://cloud.google.com/storage/docs/metadata#caching_data>. |
| `↳ custom_time` | `string` Optional. Updates objects Custom-Time fixed metadata. Unset values will be ignored. Set empty values to clear the metadata. Refer to documentation in <https://cloud.google.com/storage/docs/metadata#custom-time>. |
| `↳ custom_metadata` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. Updates objects custom metadata. Adds or sets individual custom metadata key value pairs on objects. Keys that are set with empty custom metadata values will have its value cleared. Existing custom metadata not specified with this flag is not changed. Refer to documentation in <https://cloud.google.com/storage/docs/metadata#custom-metadata> |
| `↳ object_retention` | `https://docs.cloud.google.com/php/docs/reference/cloud-storagebatchoperations/latest/V1.ObjectRetention` Optional. Updates objects retention lock configuration. Unset values will be ignored. Set empty values to clear the retention for the object with existing `Unlocked` retention mode. Object with existing `Locked` retention mode cannot be cleared or reduce retain_until_time. Refer to documentation in <https://cloud.google.com/storage/docs/object-lock> |

### getContentDisposition

Optional. Updates objects Content-Disposition fixed metadata. Unset values
will be ignored. Set empty values to clear the metadata. Refer
<https://cloud.google.com/storage/docs/metadata#content-disposition> for
additional documentation.

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

### hasContentDisposition

### clearContentDisposition

### setContentDisposition

Optional. Updates objects Content-Disposition fixed metadata. Unset values
will be ignored. Set empty values to clear the metadata. Refer
<https://cloud.google.com/storage/docs/metadata#content-disposition> for
additional documentation.

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

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

### getContentEncoding

Optional. Updates objects Content-Encoding fixed metadata. Unset values
will be ignored. Set empty values to clear the metadata. Refer to
documentation in
<https://cloud.google.com/storage/docs/metadata#content-encoding>.

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

### hasContentEncoding

### clearContentEncoding

### setContentEncoding

Optional. Updates objects Content-Encoding fixed metadata. Unset values
will be ignored. Set empty values to clear the metadata. Refer to
documentation in
<https://cloud.google.com/storage/docs/metadata#content-encoding>.

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

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

### getContentLanguage

Optional. Updates objects Content-Language fixed metadata. Refer to ISO
639-1 language codes for typical values of this metadata. Max length 100
characters. Unset values will be ignored. Set empty values to clear the
metadata. Refer to documentation in
<https://cloud.google.com/storage/docs/metadata#content-language>.

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

### hasContentLanguage

### clearContentLanguage

### setContentLanguage

Optional. Updates objects Content-Language fixed metadata. Refer to ISO
639-1 language codes for typical values of this metadata. Max length 100
characters. Unset values will be ignored. Set empty values to clear the
metadata. Refer to documentation in
<https://cloud.google.com/storage/docs/metadata#content-language>.

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

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

### getContentType

Optional. Updates objects Content-Type fixed metadata. Unset values will be
ignored. Set empty values to clear the metadata. Refer to documentation in
<https://cloud.google.com/storage/docs/metadata#content-type>

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

### hasContentType

### clearContentType

### setContentType

Optional. Updates objects Content-Type fixed metadata. Unset values will be
ignored. Set empty values to clear the metadata. Refer to documentation in
<https://cloud.google.com/storage/docs/metadata#content-type>

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

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

### getCacheControl

Optional. Updates objects Cache-Control fixed metadata. Unset values will
be ignored. Set empty values to clear the metadata. Additionally, the value
for Custom-Time cannot decrease. Refer to documentation in
<https://cloud.google.com/storage/docs/metadata#caching_data>.

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

### hasCacheControl

### clearCacheControl

### setCacheControl

Optional. Updates objects Cache-Control fixed metadata. Unset values will
be ignored. Set empty values to clear the metadata. Additionally, the value
for Custom-Time cannot decrease. Refer to documentation in
<https://cloud.google.com/storage/docs/metadata#caching_data>.

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

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

### getCustomTime

Optional. Updates objects Custom-Time fixed metadata. Unset values will be
ignored. Set empty values to clear the metadata. Refer to documentation in
<https://cloud.google.com/storage/docs/metadata#custom-time>.

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

### hasCustomTime

### clearCustomTime

### setCustomTime

Optional. Updates objects Custom-Time fixed metadata. Unset values will be
ignored. Set empty values to clear the metadata. Refer to documentation in
<https://cloud.google.com/storage/docs/metadata#custom-time>.

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

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

### getCustomMetadata

Optional. Updates objects custom metadata. Adds or sets individual custom
metadata key value pairs on objects. Keys that are set with empty custom
metadata values will have its value cleared. Existing custom metadata not
specified with this flag is not changed. Refer to documentation in
<https://cloud.google.com/storage/docs/metadata#custom-metadata>

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

### setCustomMetadata

Optional. Updates objects custom metadata. Adds or sets individual custom
metadata key value pairs on objects. Keys that are set with empty custom
metadata values will have its value cleared. Existing custom metadata not
specified with this flag is not changed. Refer to documentation in
<https://cloud.google.com/storage/docs/metadata#custom-metadata>

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

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

### getObjectRetention

Optional. Updates objects retention lock configuration. Unset values will
be ignored. Set empty values to clear the retention for the object with
existing `Unlocked` retention mode. Object with existing `Locked` retention
mode cannot be cleared or reduce retain_until_time. Refer to documentation
in <https://cloud.google.com/storage/docs/object-lock>

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-storagebatchoperations/latest/V1.ObjectRetention|null` |   |

### hasObjectRetention

### clearObjectRetention

### setObjectRetention

Optional. Updates objects retention lock configuration. Unset values will
be ignored. Set empty values to clear the retention for the object with
existing `Unlocked` retention mode. Object with existing `Locked` retention
mode cannot be cleared or reduce retain_until_time. Refer to documentation
in <https://cloud.google.com/storage/docs/object-lock>

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-storagebatchoperations/latest/V1.ObjectRetention` |

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