Describes options to update object custom contexts.

| JSON representation |
|---|
| ``` { // Union field `action` can be only one of the following: "customContextUpdates": { object (`https://docs.cloud.google.com/storage/docs/storagebatchoperations/reference/rest/v1/UpdateObjectCustomContext#CustomContextUpdates`) }, "clearAll": boolean // End of list of possible types for union field `action`. } ``` |

| Fields ||
|---|---|
| Union field `action`. One of the actions must be set. `action` can be only one of the following: ||
| `customContextUpdates` | ``object (`https://docs.cloud.google.com/storage/docs/storagebatchoperations/reference/rest/v1/UpdateObjectCustomContext#CustomContextUpdates`)`` A collection of updates to apply to specific custom contexts. Use this to add, update or delete individual contexts by key. |
| `clearAll` | `boolean` If set, must be set to true and all existing object custom contexts are deleted. |

## CustomContextUpdates

Describes a collection of updates to apply to custom contexts identified by key.

| JSON representation |
|---|
| ``` { "updates": { string: { object (`https://docs.cloud.google.com/storage/docs/storagebatchoperations/reference/rest/v1/UpdateObjectCustomContext#ObjectCustomContextPayload`) }, ... }, "keysToClear": [ string ] } ``` |

| Fields ||
|---|---|
| `updates` | ``map (key: string, value: object (`https://docs.cloud.google.com/storage/docs/storagebatchoperations/reference/rest/v1/UpdateObjectCustomContext#ObjectCustomContextPayload`))`` Optional. Insert or update the existing custom contexts. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `keysToClear[]` | `string` Optional. Custom contexts to clear by key. A key can't be present in both `updates` and `keysToClear`. |

## ObjectCustomContextPayload

Describes the payload of a user-defined object custom context.

| JSON representation |
|---|
| ``` { "value": string } ``` |

| Fields ||
|---|---|
| `value` | `string` The value of the object custom context. If set, `value` can't be an empty string because it is a required field in custom context. If unset, `value` is ignored and no changes are made to the `value` field of the custom context payload. |