@@ -95,6 +95,9 @@ message Job {
9595
9696 // Rewrite the object and updates metadata like KMS key.
9797 RewriteObject rewrite_object = 20 ;
98+
99+ // Update object custom context.
100+ UpdateObjectCustomContext update_object_custom_context = 23 ;
98101 }
99102
100103 // Optional. Logging configuration.
@@ -194,6 +197,9 @@ message BucketOperation {
194197
195198 // Rewrite the object and updates metadata like KMS key.
196199 RewriteObject rewrite_object = 14 ;
200+
201+ // Update object custom context.
202+ UpdateObjectCustomContext update_object_custom_context = 15 ;
197203 }
198204
199205 // Output only. The time that the BucketOperation was created.
@@ -407,6 +413,41 @@ message PutMetadata {
407413 [(google.api.field_behavior ) = OPTIONAL ];
408414}
409415
416+ // Describes the payload of a user defined object custom context.
417+ message ObjectCustomContextPayload {
418+ // The value of the object custom context.
419+ // If set, `value` must NOT be an empty string since it is a required field in
420+ // custom context. If unset, `value` will be ignored and no changes will be
421+ // made to the `value` field of the custom context payload.
422+ optional string value = 1 ;
423+ }
424+
425+ // Describes a collection of updates to apply to custom contexts identified
426+ // by key.
427+ message CustomContextUpdates {
428+ // Optional. Insert or update the existing custom contexts.
429+ map <string , ObjectCustomContextPayload > updates = 1
430+ [(google.api.field_behavior ) = OPTIONAL ];
431+
432+ // Optional. Custom contexts to clear by key.
433+ // A key cannot be present in both `updates` and `keys_to_clear`.
434+ repeated string keys_to_clear = 2 [(google.api.field_behavior ) = OPTIONAL ];
435+ }
436+
437+ // Describes options to update object custom contexts.
438+ message UpdateObjectCustomContext {
439+ // One of the actions must be set.
440+ oneof action {
441+ // A collection of updates to apply to specific custom contexts.
442+ // Use this to add, update or delete individual contexts by key.
443+ CustomContextUpdates custom_context_updates = 1 ;
444+
445+ // If set, must be set to true and all existing object custom contexts will
446+ // be deleted.
447+ bool clear_all = 2 ;
448+ }
449+ }
450+
410451// A summary of errors by error code, plus a count and sample error log
411452// entries.
412453message ErrorSummary {
0 commit comments