From b48e5edf72d1686148c8a9c5813e0b8937156126 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 18 Sep 2023 07:10:51 +0000 Subject: [PATCH] feat(all): auto-regenerate discovery clients --- datamigration/v1/datamigration-api.json | 17 +- datamigration/v1/datamigration-gen.go | 33 +++ gkeonprem/v1/gkeonprem-api.json | 19 +- gkeonprem/v1/gkeonprem-gen.go | 28 ++- spanner/v1/spanner-api.json | 87 +++++++- spanner/v1/spanner-gen.go | 262 ++++++++++++++++++++++++ storage/v1/storage-api.json | 70 ++++++- storage/v1/storage-gen.go | 161 +++++++++++++++ 8 files changed, 658 insertions(+), 19 deletions(-) diff --git a/datamigration/v1/datamigration-api.json b/datamigration/v1/datamigration-api.json index b02e037d6c0..31b72edbdc1 100644 --- a/datamigration/v1/datamigration-api.json +++ b/datamigration/v1/datamigration-api.json @@ -2097,7 +2097,7 @@ } } }, - "revision": "20230802", + "revision": "20230911", "rootUrl": "https://datamigration.googleapis.com/", "schemas": { "AlloyDbConnectionProfile": { @@ -2441,6 +2441,10 @@ "description": "The Cloud SQL default instance level collation.", "type": "string" }, + "dataCacheConfig": { + "$ref": "DataCacheConfig", + "description": "Optional. Configuration for data cache." + }, "dataDiskSizeGb": { "description": "The storage capacity available to the database, in GB. The minimum (and default) size is 10GB.", "format": "int64", @@ -2946,6 +2950,17 @@ }, "type": "object" }, + "DataCacheConfig": { + "description": "Data cache configurations.", + "id": "DataCacheConfig", + "properties": { + "dataCacheEnabled": { + "description": "Optional. Whether data cache is enabled for the instance.", + "type": "boolean" + } + }, + "type": "object" + }, "DatabaseEngineInfo": { "description": "The type and version of a source or destination database.", "id": "DatabaseEngineInfo", diff --git a/datamigration/v1/datamigration-gen.go b/datamigration/v1/datamigration-gen.go index b374d66aa5c..95ef9f8541d 100644 --- a/datamigration/v1/datamigration-gen.go +++ b/datamigration/v1/datamigration-gen.go @@ -814,6 +814,9 @@ type CloudSqlSettings struct { // Collation: The Cloud SQL default instance level collation. Collation string `json:"collation,omitempty"` + // DataCacheConfig: Optional. Configuration for data cache. + DataCacheConfig *DataCacheConfig `json:"dataCacheConfig,omitempty"` + // DataDiskSizeGb: The storage capacity available to the database, in // GB. The minimum (and default) size is 10GB. DataDiskSizeGb int64 `json:"dataDiskSizeGb,omitempty,string"` @@ -1446,6 +1449,36 @@ func (s *ConvertRowIdToColumn) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DataCacheConfig: Data cache configurations. +type DataCacheConfig struct { + // DataCacheEnabled: Optional. Whether data cache is enabled for the + // instance. + DataCacheEnabled bool `json:"dataCacheEnabled,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataCacheEnabled") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataCacheEnabled") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *DataCacheConfig) MarshalJSON() ([]byte, error) { + type NoMethod DataCacheConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DatabaseEngineInfo: The type and version of a source or destination // database. type DatabaseEngineInfo struct { diff --git a/gkeonprem/v1/gkeonprem-api.json b/gkeonprem/v1/gkeonprem-api.json index 93b1aa2476d..56b1458b6bf 100644 --- a/gkeonprem/v1/gkeonprem-api.json +++ b/gkeonprem/v1/gkeonprem-api.json @@ -2996,7 +2996,7 @@ } } }, - "revision": "20230815", + "revision": "20230906", "rootUrl": "https://gkeonprem.googleapis.com/", "schemas": { "Authorization": { @@ -5264,6 +5264,10 @@ "description": "Local name of the dependency.", "type": "string" }, + "membership": { + "description": "Membership names are formatted as `projects//locations//memberships/`.", + "type": "string" + }, "resourceName": { "description": "Resource name of the dependency.", "type": "string" @@ -5999,8 +6003,7 @@ }, "vcenter": { "$ref": "VmwareVCenterConfig", - "description": "Output only. VmwareVCenterConfig specifies vCenter config for the user cluster. Inherited from the admin cluster.", - "readOnly": true + "description": "VmwareVCenterConfig specifies vCenter config for the user cluster. Inherited from the admin cluster." }, "vmTrackingEnabled": { "description": "Enable VM tracking.", @@ -6565,7 +6568,8 @@ "id": "VmwareVCenterConfig", "properties": { "address": { - "description": "The vCenter IP address.", + "description": "Output only. The vCenter IP address.", + "readOnly": true, "type": "string" }, "caCertData": { @@ -6603,6 +6607,13 @@ "description": "Contains information about a specific Anthos on VMware version.", "id": "VmwareVersionInfo", "properties": { + "dependencies": { + "description": "The list of upgrade dependencies for this version.", + "items": { + "$ref": "UpgradeDependency" + }, + "type": "array" + }, "hasDependencies": { "description": "If set, the cluster dependencies (e.g. the admin cluster, other user clusters managed by the same admin cluster) must be upgraded before this version can be installed or upgraded to.", "type": "boolean" diff --git a/gkeonprem/v1/gkeonprem-gen.go b/gkeonprem/v1/gkeonprem-gen.go index ed8defbb68d..21a58d917d6 100644 --- a/gkeonprem/v1/gkeonprem-gen.go +++ b/gkeonprem/v1/gkeonprem-gen.go @@ -4489,6 +4489,10 @@ type UpgradeDependency struct { // LocalName: Local name of the dependency. LocalName string `json:"localName,omitempty"` + // Membership: Membership names are formatted as + // `projects//locations//memberships/`. + Membership string `json:"membership,omitempty"` + // ResourceName: Resource name of the dependency. ResourceName string `json:"resourceName,omitempty"` @@ -5533,8 +5537,8 @@ type VmwareCluster struct { // of the preflight check job. ValidationCheck *ValidationCheck `json:"validationCheck,omitempty"` - // Vcenter: Output only. VmwareVCenterConfig specifies vCenter config - // for the user cluster. Inherited from the admin cluster. + // Vcenter: VmwareVCenterConfig specifies vCenter config for the user + // cluster. Inherited from the admin cluster. Vcenter *VmwareVCenterConfig `json:"vcenter,omitempty"` // VmTrackingEnabled: Enable VM tracking. @@ -6476,7 +6480,7 @@ func (s *VmwareStorageConfig) MarshalJSON() ([]byte, error) { // VmwareVCenterConfig: Represents configuration for the VMware VCenter // for the user cluster. type VmwareVCenterConfig struct { - // Address: The vCenter IP address. + // Address: Output only. The vCenter IP address. Address string `json:"address,omitempty"` // CaCertData: Contains the vCenter CA certificate public key for SSL @@ -6529,6 +6533,9 @@ func (s *VmwareVCenterConfig) MarshalJSON() ([]byte, error) { // VmwareVersionInfo: Contains information about a specific Anthos on // VMware version. type VmwareVersionInfo struct { + // Dependencies: The list of upgrade dependencies for this version. + Dependencies []*UpgradeDependency `json:"dependencies,omitempty"` + // HasDependencies: If set, the cluster dependencies (e.g. the admin // cluster, other user clusters managed by the same admin cluster) must // be upgraded before this version can be installed or upgraded to. @@ -6542,7 +6549,7 @@ type VmwareVersionInfo struct { // Version: Version number e.g. 1.13.1-gke.1000. Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "HasDependencies") to + // ForceSendFields is a list of field names (e.g. "Dependencies") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6550,13 +6557,12 @@ type VmwareVersionInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HasDependencies") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Dependencies") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } diff --git a/spanner/v1/spanner-api.json b/spanner/v1/spanner-api.json index 641f4c24b82..9cbe0a1d42a 100644 --- a/spanner/v1/spanner-api.json +++ b/spanner/v1/spanner-api.json @@ -1830,6 +1830,35 @@ "https://www.googleapis.com/auth/spanner.data" ] }, + "batchWrite": { + "description": "Batches the supplied mutation groups in a collection of efficient transactions. All mutations in a group are committed atomically. However, mutations across groups can be committed non-atomically in an unspecified order and thus, they must be independent of each other. Partial failure is possible, i.e., some groups may have been committed successfully, while some may have failed. The results of individual batches are streamed into the response as the batches are applied. BatchWrite requests are not replay protected, meaning that each mutation group may be applied more than once. Replays of non-idempotent mutations may have undesirable effects. For example, replays of an insert mutation may produce an already exists error or result in additional rows if using generated or commit timestamp-based keys. We recommend structuring your mutation groups to be idempotent to avoid this issue.", + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:batchWrite", + "httpMethod": "POST", + "id": "spanner.projects.instances.databases.sessions.batchWrite", + "parameterOrder": [ + "session" + ], + "parameters": { + "session": { + "description": "Required. The session in which the batch request is to be run.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+session}:batchWrite", + "request": { + "$ref": "BatchWriteRequest" + }, + "response": { + "$ref": "BatchWriteResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data" + ] + }, "beginTransaction": { "description": "Begins a new transaction. This step can often be skipped: Read, ExecuteSql and Commit can begin a new transaction as a side-effect.", "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:beginTransaction", @@ -2565,7 +2594,7 @@ } } }, - "revision": "20230823", + "revision": "20230909", "rootUrl": "https://spanner.googleapis.com/", "schemas": { "Backup": { @@ -2717,6 +2746,48 @@ }, "type": "object" }, + "BatchWriteRequest": { + "description": "The request for BatchWrite.", + "id": "BatchWriteRequest", + "properties": { + "mutationGroups": { + "description": "Required. The groups of mutations to be applied.", + "items": { + "$ref": "MutationGroup" + }, + "type": "array" + }, + "requestOptions": { + "$ref": "RequestOptions", + "description": "Common options for this request." + } + }, + "type": "object" + }, + "BatchWriteResponse": { + "description": "The result of applying a batch of mutations.", + "id": "BatchWriteResponse", + "properties": { + "commitTimestamp": { + "description": "The commit timestamp of the transaction that applied this batch. Present if `status` is `OK`, absent otherwise.", + "format": "google-datetime", + "type": "string" + }, + "indexes": { + "description": "The mutation groups applied in this batch. The values index into the `mutation_groups` field in the corresponding `BatchWriteRequest`.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "status": { + "$ref": "Status", + "description": "An `OK` status indicates success. Any other status indicates a failure." + } + }, + "type": "object" + }, "BeginTransactionRequest": { "description": "The request for BeginTransaction.", "id": "BeginTransactionRequest", @@ -4320,6 +4391,20 @@ }, "type": "object" }, + "MutationGroup": { + "description": "A group of mutations to be committed together. Related mutations should be placed in a group. For example, two mutations inserting rows with the same primary key prefix in both parent and child tables are related.", + "id": "MutationGroup", + "properties": { + "mutations": { + "description": "Required. The mutations in this group.", + "items": { + "$ref": "Mutation" + }, + "type": "array" + } + }, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", diff --git a/spanner/v1/spanner-gen.go b/spanner/v1/spanner-gen.go index c60ed6d1dff..c9bbeac43e8 100644 --- a/spanner/v1/spanner-gen.go +++ b/spanner/v1/spanner-gen.go @@ -589,6 +589,81 @@ func (s *BatchCreateSessionsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BatchWriteRequest: The request for BatchWrite. +type BatchWriteRequest struct { + // MutationGroups: Required. The groups of mutations to be applied. + MutationGroups []*MutationGroup `json:"mutationGroups,omitempty"` + + // RequestOptions: Common options for this request. + RequestOptions *RequestOptions `json:"requestOptions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MutationGroups") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MutationGroups") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BatchWriteRequest) MarshalJSON() ([]byte, error) { + type NoMethod BatchWriteRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BatchWriteResponse: The result of applying a batch of mutations. +type BatchWriteResponse struct { + // CommitTimestamp: The commit timestamp of the transaction that applied + // this batch. Present if `status` is `OK`, absent otherwise. + CommitTimestamp string `json:"commitTimestamp,omitempty"` + + // Indexes: The mutation groups applied in this batch. The values index + // into the `mutation_groups` field in the corresponding + // `BatchWriteRequest`. + Indexes []int64 `json:"indexes,omitempty"` + + // Status: An `OK` status indicates success. Any other status indicates + // a failure. + Status *Status `json:"status,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CommitTimestamp") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CommitTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BatchWriteResponse) MarshalJSON() ([]byte, error) { + type NoMethod BatchWriteResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BeginTransactionRequest: The request for BeginTransaction. type BeginTransactionRequest struct { // Options: Required. Options for the new transaction. @@ -3546,6 +3621,37 @@ func (s *Mutation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MutationGroup: A group of mutations to be committed together. Related +// mutations should be placed in a group. For example, two mutations +// inserting rows with the same primary key prefix in both parent and +// child tables are related. +type MutationGroup struct { + // Mutations: Required. The mutations in this group. + Mutations []*Mutation `json:"mutations,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Mutations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Mutations") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MutationGroup) MarshalJSON() ([]byte, error) { + type NoMethod MutationGroup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Operation: This resource represents a long-running operation that is // the result of a network API call. type Operation struct { @@ -15024,6 +15130,162 @@ func (c *ProjectsInstancesDatabasesSessionsBatchCreateCall) Do(opts ...googleapi } +// method id "spanner.projects.instances.databases.sessions.batchWrite": + +type ProjectsInstancesDatabasesSessionsBatchWriteCall struct { + s *Service + session string + batchwriterequest *BatchWriteRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchWrite: Batches the supplied mutation groups in a collection of +// efficient transactions. All mutations in a group are committed +// atomically. However, mutations across groups can be committed +// non-atomically in an unspecified order and thus, they must be +// independent of each other. Partial failure is possible, i.e., some +// groups may have been committed successfully, while some may have +// failed. The results of individual batches are streamed into the +// response as the batches are applied. BatchWrite requests are not +// replay protected, meaning that each mutation group may be applied +// more than once. Replays of non-idempotent mutations may have +// undesirable effects. For example, replays of an insert mutation may +// produce an already exists error or result in additional rows if using +// generated or commit timestamp-based keys. We recommend structuring +// your mutation groups to be idempotent to avoid this issue. +// +// - session: The session in which the batch request is to be run. +func (r *ProjectsInstancesDatabasesSessionsService) BatchWrite(session string, batchwriterequest *BatchWriteRequest) *ProjectsInstancesDatabasesSessionsBatchWriteCall { + c := &ProjectsInstancesDatabasesSessionsBatchWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.session = session + c.batchwriterequest = batchwriterequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsInstancesDatabasesSessionsBatchWriteCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsBatchWriteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsInstancesDatabasesSessionsBatchWriteCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsBatchWriteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsInstancesDatabasesSessionsBatchWriteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsInstancesDatabasesSessionsBatchWriteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchwriterequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:batchWrite") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "session": c.session, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "spanner.projects.instances.databases.sessions.batchWrite" call. +// Exactly one of *BatchWriteResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *BatchWriteResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsInstancesDatabasesSessionsBatchWriteCall) Do(opts ...googleapi.CallOption) (*BatchWriteResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &BatchWriteResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Batches the supplied mutation groups in a collection of efficient transactions. All mutations in a group are committed atomically. However, mutations across groups can be committed non-atomically in an unspecified order and thus, they must be independent of each other. Partial failure is possible, i.e., some groups may have been committed successfully, while some may have failed. The results of individual batches are streamed into the response as the batches are applied. BatchWrite requests are not replay protected, meaning that each mutation group may be applied more than once. Replays of non-idempotent mutations may have undesirable effects. For example, replays of an insert mutation may produce an already exists error or result in additional rows if using generated or commit timestamp-based keys. We recommend structuring your mutation groups to be idempotent to avoid this issue.", + // "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:batchWrite", + // "httpMethod": "POST", + // "id": "spanner.projects.instances.databases.sessions.batchWrite", + // "parameterOrder": [ + // "session" + // ], + // "parameters": { + // "session": { + // "description": "Required. The session in which the batch request is to be run.", + // "location": "path", + // "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+session}:batchWrite", + // "request": { + // "$ref": "BatchWriteRequest" + // }, + // "response": { + // "$ref": "BatchWriteResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/spanner.data" + // ] + // } + +} + // method id "spanner.projects.instances.databases.sessions.beginTransaction": type ProjectsInstancesDatabasesSessionsBeginTransactionCall struct { diff --git a/storage/v1/storage-api.json b/storage/v1/storage-api.json index 9e3b2dc465c..64831d2df29 100644 --- a/storage/v1/storage-api.json +++ b/storage/v1/storage-api.json @@ -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": "\"3137393534363837313035303430333138303233\"", + "etag": "\"3132363038323634353839373135393539313634\"", "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" @@ -446,6 +446,12 @@ "project" ], "parameters": { + "enableObjectRetention": { + "default": "false", + "description": "When set to true, object retention is enabled for this bucket.", + "location": "query", + "type": "boolean" + }, "predefinedAcl": { "description": "Apply a predefined set of access controls to this bucket.", "enum": [ @@ -2295,6 +2301,11 @@ "required": true, "type": "string" }, + "overrideUnlockedRetention": { + "description": "Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked.", + "location": "query", + "type": "boolean" + }, "predefinedAcl": { "description": "Apply a predefined set of access controls to this object.", "enum": [ @@ -2738,6 +2749,11 @@ "required": true, "type": "string" }, + "overrideUnlockedRetention": { + "description": "Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked.", + "location": "query", + "type": "boolean" + }, "predefinedAcl": { "description": "Apply a predefined set of access controls to this object.", "enum": [ @@ -3242,7 +3258,7 @@ } } }, - "revision": "20230907", + "revision": "20230914", "rootUrl": "https://storage.googleapis.com/", "schemas": { "Bucket": { @@ -3268,6 +3284,15 @@ "description": "Whether or not Autoclass is enabled on this bucket", "type": "boolean" }, + "terminalStorageClass": { + "description": "The storage class that objects in the bucket eventually transition to if they are not read for a certain length of time. Valid values are NEARLINE and ARCHIVE.", + "type": "string" + }, + "terminalStorageClassUpdateTime": { + "description": "A date and time in RFC 3339 format representing the time of the most recent update to \"terminalStorageClass\".", + "format": "date-time", + "type": "string" + }, "toggleTime": { "description": "A date and time in RFC 3339 format representing the instant at which \"enabled\" was last toggled.", "format": "date-time", @@ -3551,6 +3576,16 @@ "description": "The name of the bucket.", "type": "string" }, + "objectRetention": { + "description": "The bucket's object retention config.", + "properties": { + "mode": { + "description": "The bucket's object retention mode. Can be Enabled.", + "type": "string" + } + }, + "type": "object" + }, "owner": { "description": "The owner of the bucket. This is always the project team's owner group.", "properties": { @@ -3602,6 +3637,22 @@ "description": "The URI of this bucket.", "type": "string" }, + "softDeletePolicy": { + "description": "The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted.", + "properties": { + "effectiveTime": { + "description": "Server-determined value that indicates the time from which the policy, or one with a greater retention, was effective. This value is in RFC 3339 format.", + "format": "date-time", + "type": "string" + }, + "retentionDurationSeconds": { + "description": "The period of time in seconds, that soft-deleted objects in the bucket will be retained and cannot be permanently deleted.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "storageClass": { "description": "The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes.", "type": "string" @@ -4306,6 +4357,21 @@ }, "type": "object" }, + "retention": { + "description": "A collection of object level retention parameters.", + "properties": { + "mode": { + "description": "The bucket's object retention mode, can only be Unlocked or Locked.", + "type": "string" + }, + "retainUntilTime": { + "description": "A time in RFC 3339 format until which object retention protects this object.", + "format": "date-time", + "type": "string" + } + }, + "type": "object" + }, "retentionExpirationTime": { "description": "A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold).", "format": "date-time", diff --git a/storage/v1/storage-gen.go b/storage/v1/storage-gen.go index a634bb7d65e..952d1b3e00f 100644 --- a/storage/v1/storage-gen.go +++ b/storage/v1/storage-gen.go @@ -385,6 +385,9 @@ type Bucket struct { // Name: The name of the bucket. Name string `json:"name,omitempty"` + // ObjectRetention: The bucket's object retention config. + ObjectRetention *BucketObjectRetention `json:"objectRetention,omitempty"` + // Owner: The owner of the bucket. This is always the project team's // owner group. Owner *BucketOwner `json:"owner,omitempty"` @@ -415,6 +418,11 @@ type Bucket struct { // SelfLink: The URI of this bucket. SelfLink string `json:"selfLink,omitempty"` + // SoftDeletePolicy: The bucket's soft delete policy, which defines the + // period of time that soft-deleted objects will be retained, and cannot + // be permanently deleted. + SoftDeletePolicy *BucketSoftDeletePolicy `json:"softDeletePolicy,omitempty"` + // StorageClass: The bucket's default storage class, used whenever no // storageClass is specified for a newly-created object. This defines // how objects in the bucket are stored and determines the SLA and the @@ -470,6 +478,16 @@ type BucketAutoclass struct { // Enabled: Whether or not Autoclass is enabled on this bucket Enabled bool `json:"enabled,omitempty"` + // TerminalStorageClass: The storage class that objects in the bucket + // eventually transition to if they are not read for a certain length of + // time. Valid values are NEARLINE and ARCHIVE. + TerminalStorageClass string `json:"terminalStorageClass,omitempty"` + + // TerminalStorageClassUpdateTime: A date and time in RFC 3339 format + // representing the time of the most recent update to + // "terminalStorageClass". + TerminalStorageClassUpdateTime string `json:"terminalStorageClassUpdateTime,omitempty"` + // ToggleTime: A date and time in RFC 3339 format representing the // instant at which "enabled" was last toggled. ToggleTime string `json:"toggleTime,omitempty"` @@ -972,6 +990,34 @@ func (s *BucketLogging) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BucketObjectRetention: The bucket's object retention config. +type BucketObjectRetention struct { + // Mode: The bucket's object retention mode. Can be Enabled. + Mode string `json:"mode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Mode") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Mode") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BucketObjectRetention) MarshalJSON() ([]byte, error) { + type NoMethod BucketObjectRetention + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BucketOwner: The owner of the bucket. This is always the project // team's owner group. type BucketOwner struct { @@ -1053,6 +1099,43 @@ func (s *BucketRetentionPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BucketSoftDeletePolicy: The bucket's soft delete policy, which +// defines the period of time that soft-deleted objects will be +// retained, and cannot be permanently deleted. +type BucketSoftDeletePolicy struct { + // EffectiveTime: Server-determined value that indicates the time from + // which the policy, or one with a greater retention, was effective. + // This value is in RFC 3339 format. + EffectiveTime string `json:"effectiveTime,omitempty"` + + // RetentionDurationSeconds: The period of time in seconds, that + // soft-deleted objects in the bucket will be retained and cannot be + // permanently deleted. + RetentionDurationSeconds int64 `json:"retentionDurationSeconds,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "EffectiveTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EffectiveTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BucketSoftDeletePolicy) MarshalJSON() ([]byte, error) { + type NoMethod BucketSoftDeletePolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BucketVersioning: The bucket's versioning configuration. type BucketVersioning struct { // Enabled: While set to true, versioning is fully enabled for this @@ -2072,6 +2155,9 @@ type Object struct { // the object. Owner *ObjectOwner `json:"owner,omitempty"` + // Retention: A collection of object level retention parameters. + Retention *ObjectRetention `json:"retention,omitempty"` + // RetentionExpirationTime: A server-determined value that specifies the // earliest time that the object's retention period expires. This value // is in RFC 3339 format. Note 1: This field is not provided for objects @@ -2213,6 +2299,39 @@ func (s *ObjectOwner) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ObjectRetention: A collection of object level retention parameters. +type ObjectRetention struct { + // Mode: The bucket's object retention mode, can only be Unlocked or + // Locked. + Mode string `json:"mode,omitempty"` + + // RetainUntilTime: A time in RFC 3339 format until which object + // retention protects this object. + RetainUntilTime string `json:"retainUntilTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Mode") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Mode") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ObjectRetention) MarshalJSON() ([]byte, error) { + type NoMethod ObjectRetention + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ObjectAccessControl: An access-control entry. type ObjectAccessControl struct { // Bucket: The name of the bucket. @@ -4189,6 +4308,14 @@ func (r *BucketsService) Insert(projectid string, bucket *Bucket) *BucketsInsert return c } +// EnableObjectRetention sets the optional parameter +// "enableObjectRetention": When set to true, object retention is +// enabled for this bucket. +func (c *BucketsInsertCall) EnableObjectRetention(enableObjectRetention bool) *BucketsInsertCall { + c.urlParams_.Set("enableObjectRetention", fmt.Sprint(enableObjectRetention)) + return c +} + // PredefinedAcl sets the optional parameter "predefinedAcl": Apply a // predefined set of access controls to this bucket. // @@ -4362,6 +4489,12 @@ func (c *BucketsInsertCall) Do(opts ...googleapi.CallOption) (*Bucket, error) { // "project" // ], // "parameters": { + // "enableObjectRetention": { + // "default": "false", + // "description": "When set to true, object retention is enabled for this bucket.", + // "location": "query", + // "type": "boolean" + // }, // "predefinedAcl": { // "description": "Apply a predefined set of access controls to this bucket.", // "enum": [ @@ -10976,6 +11109,15 @@ func (c *ObjectsPatchCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch int return c } +// OverrideUnlockedRetention sets the optional parameter +// "overrideUnlockedRetention": Must be true to remove the retention +// configuration, reduce its unlocked retention period, or change its +// mode from unlocked to locked. +func (c *ObjectsPatchCall) OverrideUnlockedRetention(overrideUnlockedRetention bool) *ObjectsPatchCall { + c.urlParams_.Set("overrideUnlockedRetention", fmt.Sprint(overrideUnlockedRetention)) + return c +} + // PredefinedAcl sets the optional parameter "predefinedAcl": Apply a // predefined set of access controls to this object. // @@ -11167,6 +11309,11 @@ func (c *ObjectsPatchCall) Do(opts ...googleapi.CallOption) (*Object, error) { // "required": true, // "type": "string" // }, + // "overrideUnlockedRetention": { + // "description": "Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked.", + // "location": "query", + // "type": "boolean" + // }, // "predefinedAcl": { // "description": "Apply a predefined set of access controls to this object.", // "enum": [ @@ -12393,6 +12540,15 @@ func (c *ObjectsUpdateCall) IfMetagenerationNotMatch(ifMetagenerationNotMatch in return c } +// OverrideUnlockedRetention sets the optional parameter +// "overrideUnlockedRetention": Must be true to remove the retention +// configuration, reduce its unlocked retention period, or change its +// mode from unlocked to locked. +func (c *ObjectsUpdateCall) OverrideUnlockedRetention(overrideUnlockedRetention bool) *ObjectsUpdateCall { + c.urlParams_.Set("overrideUnlockedRetention", fmt.Sprint(overrideUnlockedRetention)) + return c +} + // PredefinedAcl sets the optional parameter "predefinedAcl": Apply a // predefined set of access controls to this object. // @@ -12584,6 +12740,11 @@ func (c *ObjectsUpdateCall) Do(opts ...googleapi.CallOption) (*Object, error) { // "required": true, // "type": "string" // }, + // "overrideUnlockedRetention": { + // "description": "Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked.", + // "location": "query", + // "type": "boolean" + // }, // "predefinedAcl": { // "description": "Apply a predefined set of access controls to this object.", // "enum": [