Skip to content

Commit

Permalink
feat(storage)!: update the API
Browse files Browse the repository at this point in the history
BREAKING CHANGE: This release has breaking changes.

#### storage:v1

The following keys were deleted:
- schemas.Bucket.properties.zoneAffinity.description
- schemas.Bucket.properties.zoneAffinity.items.type
- schemas.Bucket.properties.zoneAffinity.type

The following keys were added:
- schemas.Bucket.properties.customPlacementConfig.description
- schemas.Bucket.properties.customPlacementConfig.properties.dataLocations.description
- schemas.Bucket.properties.customPlacementConfig.properties.dataLocations.items.type
- schemas.Bucket.properties.customPlacementConfig.properties.dataLocations.type
- schemas.Bucket.properties.customPlacementConfig.type
- schemas.Bucket.properties.rpo.description
- schemas.Bucket.properties.rpo.type
  • Loading branch information
yoshi-automation authored and sofisl committed Sep 23, 2021
1 parent 3dfd885 commit 08a7f05
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 29 deletions.
28 changes: 19 additions & 9 deletions discovery/storage-v1.json
Expand Up @@ -26,7 +26,7 @@
"description": "Stores and retrieves potentially large, immutable data objects.",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/storage/docs/json_api/",
"etag": "\"31303330333936363634353731373635353631\"",
"etag": "\"353939383733353534373734383337373436\"",
"icons": {
"x16": "https://www.google.com/images/icons/product/cloud_storage-16.png",
"x32": "https://www.google.com/images/icons/product/cloud_storage-32.png"
Expand Down Expand Up @@ -3230,7 +3230,7 @@
}
}
},
"revision": "20210302",
"revision": "20210918",
"rootUrl": "https://storage.googleapis.com/",
"schemas": {
"Bucket": {
Expand Down Expand Up @@ -3294,6 +3294,19 @@
},
"type": "array"
},
"customPlacementConfig": {
"description": "The bucket's custom placement configuration for Custom Dual Regions.",
"properties": {
"dataLocations": {
"description": "The list of regional locations in which data is placed.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"defaultEventBasedHold": {
"description": "The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false. Objects under event-based hold cannot be deleted, overwritten or archived until the hold is removed.",
"type": "boolean"
Expand Down Expand Up @@ -3536,6 +3549,10 @@
},
"type": "object"
},
"rpo": {
"description": "The Recovery Point Objective (RPO) of this bucket. Set to ASYNC_TURBO to turn on Turbo Replication on a bucket.",
"type": "string"
},
"satisfiesPZS": {
"description": "Reserved for future use.",
"type": "boolean"
Expand Down Expand Up @@ -3581,13 +3598,6 @@
}
},
"type": "object"
},
"zoneAffinity": {
"description": "The zone or zones from which the bucket is intended to use zonal quota. Requests for data from outside the specified affinities are still allowed but won't be able to use zonal quota. The zone or zones need to be within the bucket location otherwise the requests will fail with a 400 Bad Request response.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
Expand Down
52 changes: 32 additions & 20 deletions src/apis/storage/v1.ts
Expand Up @@ -149,6 +149,10 @@ export namespace storage_v1 {
origin?: string[];
responseHeader?: string[];
}> | null;
/**
* The bucket's custom placement configuration for Custom Dual Regions.
*/
customPlacementConfig?: {dataLocations?: string[]} | null;
/**
* The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false. Objects under event-based hold cannot be deleted, overwritten or archived until the hold is removed.
*/
Expand Down Expand Up @@ -241,6 +245,10 @@ export namespace storage_v1 {
isLocked?: boolean;
retentionPeriod?: string;
} | null;
/**
* The Recovery Point Objective (RPO) of this bucket. Set to ASYNC_TURBO to turn on Turbo Replication on a bucket.
*/
rpo?: string | null;
/**
* Reserved for future use.
*/
Expand Down Expand Up @@ -269,10 +277,6 @@ export namespace storage_v1 {
* The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information.
*/
website?: {mainPageSuffix?: string; notFoundPage?: string} | null;
/**
* The zone or zones from which the bucket is intended to use zonal quota. Requests for data from outside the specified affinities are still allowed but won't be able to use zonal quota. The zone or zones need to be within the bucket location otherwise the requests will fail with a 400 Bad Request response.
*/
zoneAffinity?: string[] | null;
}
/**
* An access-control entry.
Expand Down Expand Up @@ -2171,6 +2175,7 @@ export namespace storage_v1 {
* // "acl": [],
* // "billing": {},
* // "cors": [],
* // "customPlacementConfig": {},
* // "defaultEventBasedHold": false,
* // "defaultObjectAcl": [],
* // "encryption": {},
Expand All @@ -2188,14 +2193,14 @@ export namespace storage_v1 {
* // "owner": {},
* // "projectNumber": "my_projectNumber",
* // "retentionPolicy": {},
* // "rpo": "my_rpo",
* // "satisfiesPZS": false,
* // "selfLink": "my_selfLink",
* // "storageClass": "my_storageClass",
* // "timeCreated": "my_timeCreated",
* // "updated": "my_updated",
* // "versioning": {},
* // "website": {},
* // "zoneAffinity": []
* // "website": {}
* // }
* }
*
Expand Down Expand Up @@ -2482,6 +2487,7 @@ export namespace storage_v1 {
* // "acl": [],
* // "billing": {},
* // "cors": [],
* // "customPlacementConfig": {},
* // "defaultEventBasedHold": false,
* // "defaultObjectAcl": [],
* // "encryption": {},
Expand All @@ -2499,14 +2505,14 @@ export namespace storage_v1 {
* // "owner": {},
* // "projectNumber": "my_projectNumber",
* // "retentionPolicy": {},
* // "rpo": "my_rpo",
* // "satisfiesPZS": false,
* // "selfLink": "my_selfLink",
* // "storageClass": "my_storageClass",
* // "timeCreated": "my_timeCreated",
* // "updated": "my_updated",
* // "versioning": {},
* // "website": {},
* // "zoneAffinity": []
* // "website": {}
* // }
* },
* });
Expand All @@ -2517,6 +2523,7 @@ export namespace storage_v1 {
* // "acl": [],
* // "billing": {},
* // "cors": [],
* // "customPlacementConfig": {},
* // "defaultEventBasedHold": false,
* // "defaultObjectAcl": [],
* // "encryption": {},
Expand All @@ -2534,14 +2541,14 @@ export namespace storage_v1 {
* // "owner": {},
* // "projectNumber": "my_projectNumber",
* // "retentionPolicy": {},
* // "rpo": "my_rpo",
* // "satisfiesPZS": false,
* // "selfLink": "my_selfLink",
* // "storageClass": "my_storageClass",
* // "timeCreated": "my_timeCreated",
* // "updated": "my_updated",
* // "versioning": {},
* // "website": {},
* // "zoneAffinity": []
* // "website": {}
* // }
* }
*
Expand Down Expand Up @@ -2824,6 +2831,7 @@ export namespace storage_v1 {
* // "acl": [],
* // "billing": {},
* // "cors": [],
* // "customPlacementConfig": {},
* // "defaultEventBasedHold": false,
* // "defaultObjectAcl": [],
* // "encryption": {},
Expand All @@ -2841,14 +2849,14 @@ export namespace storage_v1 {
* // "owner": {},
* // "projectNumber": "my_projectNumber",
* // "retentionPolicy": {},
* // "rpo": "my_rpo",
* // "satisfiesPZS": false,
* // "selfLink": "my_selfLink",
* // "storageClass": "my_storageClass",
* // "timeCreated": "my_timeCreated",
* // "updated": "my_updated",
* // "versioning": {},
* // "website": {},
* // "zoneAffinity": []
* // "website": {}
* // }
* }
*
Expand Down Expand Up @@ -2996,6 +3004,7 @@ export namespace storage_v1 {
* // "acl": [],
* // "billing": {},
* // "cors": [],
* // "customPlacementConfig": {},
* // "defaultEventBasedHold": false,
* // "defaultObjectAcl": [],
* // "encryption": {},
Expand All @@ -3013,14 +3022,14 @@ export namespace storage_v1 {
* // "owner": {},
* // "projectNumber": "my_projectNumber",
* // "retentionPolicy": {},
* // "rpo": "my_rpo",
* // "satisfiesPZS": false,
* // "selfLink": "my_selfLink",
* // "storageClass": "my_storageClass",
* // "timeCreated": "my_timeCreated",
* // "updated": "my_updated",
* // "versioning": {},
* // "website": {},
* // "zoneAffinity": []
* // "website": {}
* // }
* },
* });
Expand All @@ -3031,6 +3040,7 @@ export namespace storage_v1 {
* // "acl": [],
* // "billing": {},
* // "cors": [],
* // "customPlacementConfig": {},
* // "defaultEventBasedHold": false,
* // "defaultObjectAcl": [],
* // "encryption": {},
Expand All @@ -3048,14 +3058,14 @@ export namespace storage_v1 {
* // "owner": {},
* // "projectNumber": "my_projectNumber",
* // "retentionPolicy": {},
* // "rpo": "my_rpo",
* // "satisfiesPZS": false,
* // "selfLink": "my_selfLink",
* // "storageClass": "my_storageClass",
* // "timeCreated": "my_timeCreated",
* // "updated": "my_updated",
* // "versioning": {},
* // "website": {},
* // "zoneAffinity": []
* // "website": {}
* // }
* }
*
Expand Down Expand Up @@ -3503,6 +3513,7 @@ export namespace storage_v1 {
* // "acl": [],
* // "billing": {},
* // "cors": [],
* // "customPlacementConfig": {},
* // "defaultEventBasedHold": false,
* // "defaultObjectAcl": [],
* // "encryption": {},
Expand All @@ -3520,14 +3531,14 @@ export namespace storage_v1 {
* // "owner": {},
* // "projectNumber": "my_projectNumber",
* // "retentionPolicy": {},
* // "rpo": "my_rpo",
* // "satisfiesPZS": false,
* // "selfLink": "my_selfLink",
* // "storageClass": "my_storageClass",
* // "timeCreated": "my_timeCreated",
* // "updated": "my_updated",
* // "versioning": {},
* // "website": {},
* // "zoneAffinity": []
* // "website": {}
* // }
* },
* });
Expand All @@ -3538,6 +3549,7 @@ export namespace storage_v1 {
* // "acl": [],
* // "billing": {},
* // "cors": [],
* // "customPlacementConfig": {},
* // "defaultEventBasedHold": false,
* // "defaultObjectAcl": [],
* // "encryption": {},
Expand All @@ -3555,14 +3567,14 @@ export namespace storage_v1 {
* // "owner": {},
* // "projectNumber": "my_projectNumber",
* // "retentionPolicy": {},
* // "rpo": "my_rpo",
* // "satisfiesPZS": false,
* // "selfLink": "my_selfLink",
* // "storageClass": "my_storageClass",
* // "timeCreated": "my_timeCreated",
* // "updated": "my_updated",
* // "versioning": {},
* // "website": {},
* // "zoneAffinity": []
* // "website": {}
* // }
* }
*
Expand Down

0 comments on commit 08a7f05

Please sign in to comment.