Skip to content

Commit 5418407

Browse files
feat(storagebatchoperations): update the API
#### storagebatchoperations:v1 The following keys were added: - schemas.ObjectRetention.description - schemas.ObjectRetention.id - schemas.ObjectRetention.properties.retainUntilTime.description - schemas.ObjectRetention.properties.retainUntilTime.type - schemas.ObjectRetention.properties.retentionMode.description - schemas.ObjectRetention.properties.retentionMode.enum - schemas.ObjectRetention.properties.retentionMode.enumDescriptions - schemas.ObjectRetention.properties.retentionMode.type - schemas.ObjectRetention.type - schemas.PutMetadata.properties.objectRetention.$ref - schemas.PutMetadata.properties.objectRetention.description
1 parent 2cfdc79 commit 5418407

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

discovery/storagebatchoperations-v1.json

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@
487487
}
488488
}
489489
},
490-
"revision": "20250924",
490+
"revision": "20251015",
491491
"rootUrl": "https://storagebatchoperations.googleapis.com/",
492492
"schemas": {
493493
"Bucket": {
@@ -910,6 +910,31 @@
910910
},
911911
"type": "object"
912912
},
913+
"ObjectRetention": {
914+
"description": "Describes options for object retention update.",
915+
"id": "ObjectRetention",
916+
"properties": {
917+
"retainUntilTime": {
918+
"description": "Required. The time when the object will be retained until. UNSET will clear the retention. Must be specified in RFC 3339 format e.g. YYYY-MM-DD'T'HH:MM:SS.SS'Z' or YYYY-MM-DD'T'HH:MM:SS'Z'.",
919+
"type": "string"
920+
},
921+
"retentionMode": {
922+
"description": "Required. The retention mode of the object.",
923+
"enum": [
924+
"RETENTION_MODE_UNSPECIFIED",
925+
"LOCKED",
926+
"UNLOCKED"
927+
],
928+
"enumDescriptions": [
929+
"If set and retain_until_time is empty, clears the retention.",
930+
"Sets the retention mode to locked.",
931+
"Sets the retention mode to unlocked."
932+
],
933+
"type": "string"
934+
}
935+
},
936+
"type": "object"
937+
},
913938
"Operation": {
914939
"description": "This resource represents a long-running operation that is the result of a network API call.",
915940
"id": "Operation",
@@ -1032,6 +1057,10 @@
10321057
"customTime": {
10331058
"description": "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.",
10341059
"type": "string"
1060+
},
1061+
"objectRetention": {
1062+
"$ref": "ObjectRetention",
1063+
"description": "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"
10351064
}
10361065
},
10371066
"type": "object"

src/apis/storagebatchoperations/v1.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,19 @@ export namespace storagebatchoperations_v1 {
382382
*/
383383
manifestLocation?: string | null;
384384
}
385+
/**
386+
* Describes options for object retention update.
387+
*/
388+
export interface Schema$ObjectRetention {
389+
/**
390+
* Required. The time when the object will be retained until. UNSET will clear the retention. Must be specified in RFC 3339 format e.g. YYYY-MM-DD'T'HH:MM:SS.SS'Z' or YYYY-MM-DD'T'HH:MM:SS'Z'.
391+
*/
392+
retainUntilTime?: string | null;
393+
/**
394+
* Required. The retention mode of the object.
395+
*/
396+
retentionMode?: string | null;
397+
}
385398
/**
386399
* This resource represents a long-running operation that is the result of a network API call.
387400
*/
@@ -477,6 +490,10 @@ export namespace storagebatchoperations_v1 {
477490
* 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.
478491
*/
479492
customTime?: string | null;
493+
/**
494+
* 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
495+
*/
496+
objectRetention?: Schema$ObjectRetention;
480497
}
481498
/**
482499
* Describes options to update object hold.

0 commit comments

Comments
 (0)