diff --git a/alloydb/v1/alloydb-api.json b/alloydb/v1/alloydb-api.json index 75a3cae9ea..632b39ebf7 100644 --- a/alloydb/v1/alloydb-api.json +++ b/alloydb/v1/alloydb-api.json @@ -707,6 +707,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "switchover": { + "description": "Switches the role of PRIMARY and SECONDARY cluster without any data loss. This promotes the SECONDARY cluster to PRIMARY and sets up original PRIMARY cluster to replicate from this newly promoted cluster.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:switchover", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.switchover", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Cluster.name field", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:switchover", + "request": { + "$ref": "SwitchoverClusterRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -1461,7 +1489,7 @@ } } }, - "revision": "20240605", + "revision": "20240612", "rootUrl": "https://alloydb.googleapis.com/", "schemas": { "AuthorizedNetwork": { @@ -4522,6 +4550,21 @@ }, "type": "object" }, + "SwitchoverClusterRequest": { + "description": "Message for switching over to a cluster", + "id": "SwitchoverClusterRequest", + "properties": { + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the delete.", + "type": "boolean" + } + }, + "type": "object" + }, "TimeBasedRetention": { "description": "A time based retention policy specifies that all backups within a certain time period should be retained.", "id": "TimeBasedRetention", diff --git a/alloydb/v1/alloydb-gen.go b/alloydb/v1/alloydb-gen.go index be3e5ccae7..2047066ca1 100644 --- a/alloydb/v1/alloydb-gen.go +++ b/alloydb/v1/alloydb-gen.go @@ -3465,6 +3465,42 @@ func (s *SupportedDatabaseFlag) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// SwitchoverClusterRequest: Message for switching over to a cluster +type SwitchoverClusterRequest struct { + // RequestId: Optional. An optional request ID to identify requests. Specify a + // unique request ID so that if you must retry your request, the server will + // know to ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. For example, + // consider a situation where you make an initial request and the request times + // out. If you make the request again with the same request ID, the server can + // check if original operation with the same request ID was received, and if + // so, will ignore the second request. This prevents clients from accidentally + // creating duplicate commitments. The request ID must be a valid UUID with the + // exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + // ValidateOnly: Optional. If set, performs request validation (e.g. permission + // checks and any other type of validation), but do not actually execute the + // delete. + ValidateOnly bool `json:"validateOnly,omitempty"` + // ForceSendFields is a list of field names (e.g. "RequestId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RequestId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *SwitchoverClusterRequest) MarshalJSON() ([]byte, error) { + type NoMethod SwitchoverClusterRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // TimeBasedRetention: A time based retention policy specifies that all backups // within a certain time period should be retained. type TimeBasedRetention struct { @@ -5577,6 +5613,110 @@ func (c *ProjectsLocationsClustersRestoreCall) Do(opts ...googleapi.CallOption) return ret, nil } +type ProjectsLocationsClustersSwitchoverCall struct { + s *Service + name string + switchoverclusterrequest *SwitchoverClusterRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Switchover: Switches the role of PRIMARY and SECONDARY cluster without any +// data loss. This promotes the SECONDARY cluster to PRIMARY and sets up +// original PRIMARY cluster to replicate from this newly promoted cluster. +// +// - name: The name of the resource. For the required format, see the comment +// on the Cluster.name field. +func (r *ProjectsLocationsClustersService) Switchover(name string, switchoverclusterrequest *SwitchoverClusterRequest) *ProjectsLocationsClustersSwitchoverCall { + c := &ProjectsLocationsClustersSwitchoverCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.switchoverclusterrequest = switchoverclusterrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsClustersSwitchoverCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSwitchoverCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsClustersSwitchoverCall) Context(ctx context.Context) *ProjectsLocationsClustersSwitchoverCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsClustersSwitchoverCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersSwitchoverCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.switchoverclusterrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:switchover") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.clusters.switchover" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsClustersSwitchoverCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + type ProjectsLocationsClustersInstancesCreateCall struct { s *Service parent string diff --git a/alloydb/v1alpha/alloydb-api.json b/alloydb/v1alpha/alloydb-api.json index 84fcbc0878..2b5629bc8a 100644 --- a/alloydb/v1alpha/alloydb-api.json +++ b/alloydb/v1alpha/alloydb-api.json @@ -707,6 +707,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "switchover": { + "description": "Switches the role of PRIMARY and SECONDARY cluster without any data loss. This promotes the SECONDARY cluster to PRIMARY and sets up original PRIMARY cluster to replicate from this newly promoted cluster.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:switchover", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.switchover", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Cluster.name field", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:switchover", + "request": { + "$ref": "SwitchoverClusterRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -1461,7 +1489,7 @@ } } }, - "revision": "20240605", + "revision": "20240612", "rootUrl": "https://alloydb.googleapis.com/", "schemas": { "AuthorizedNetwork": { @@ -4664,6 +4692,21 @@ }, "type": "object" }, + "SwitchoverClusterRequest": { + "description": "Message for switching over to a cluster", + "id": "SwitchoverClusterRequest", + "properties": { + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the delete.", + "type": "boolean" + } + }, + "type": "object" + }, "TimeBasedRetention": { "description": "A time based retention policy specifies that all backups within a certain time period should be retained.", "id": "TimeBasedRetention", diff --git a/alloydb/v1alpha/alloydb-gen.go b/alloydb/v1alpha/alloydb-gen.go index e9b3f5852b..5153fbb1ef 100644 --- a/alloydb/v1alpha/alloydb-gen.go +++ b/alloydb/v1alpha/alloydb-gen.go @@ -3606,6 +3606,42 @@ func (s *SupportedDatabaseFlag) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// SwitchoverClusterRequest: Message for switching over to a cluster +type SwitchoverClusterRequest struct { + // RequestId: Optional. An optional request ID to identify requests. Specify a + // unique request ID so that if you must retry your request, the server will + // know to ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. For example, + // consider a situation where you make an initial request and the request times + // out. If you make the request again with the same request ID, the server can + // check if original operation with the same request ID was received, and if + // so, will ignore the second request. This prevents clients from accidentally + // creating duplicate commitments. The request ID must be a valid UUID with the + // exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + // ValidateOnly: Optional. If set, performs request validation (e.g. permission + // checks and any other type of validation), but do not actually execute the + // delete. + ValidateOnly bool `json:"validateOnly,omitempty"` + // ForceSendFields is a list of field names (e.g. "RequestId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RequestId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *SwitchoverClusterRequest) MarshalJSON() ([]byte, error) { + type NoMethod SwitchoverClusterRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // TimeBasedRetention: A time based retention policy specifies that all backups // within a certain time period should be retained. type TimeBasedRetention struct { @@ -5773,6 +5809,110 @@ func (c *ProjectsLocationsClustersRestoreCall) Do(opts ...googleapi.CallOption) return ret, nil } +type ProjectsLocationsClustersSwitchoverCall struct { + s *Service + name string + switchoverclusterrequest *SwitchoverClusterRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Switchover: Switches the role of PRIMARY and SECONDARY cluster without any +// data loss. This promotes the SECONDARY cluster to PRIMARY and sets up +// original PRIMARY cluster to replicate from this newly promoted cluster. +// +// - name: The name of the resource. For the required format, see the comment +// on the Cluster.name field. +func (r *ProjectsLocationsClustersService) Switchover(name string, switchoverclusterrequest *SwitchoverClusterRequest) *ProjectsLocationsClustersSwitchoverCall { + c := &ProjectsLocationsClustersSwitchoverCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.switchoverclusterrequest = switchoverclusterrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsClustersSwitchoverCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSwitchoverCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsClustersSwitchoverCall) Context(ctx context.Context) *ProjectsLocationsClustersSwitchoverCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsClustersSwitchoverCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersSwitchoverCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.switchoverclusterrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:switchover") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.clusters.switchover" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsClustersSwitchoverCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + type ProjectsLocationsClustersInstancesCreateCall struct { s *Service parent string diff --git a/alloydb/v1beta/alloydb-api.json b/alloydb/v1beta/alloydb-api.json index 17157b7118..7152ea747f 100644 --- a/alloydb/v1beta/alloydb-api.json +++ b/alloydb/v1beta/alloydb-api.json @@ -707,6 +707,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "switchover": { + "description": "Switches the role of PRIMARY and SECONDARY cluster without any data loss. This promotes the SECONDARY cluster to PRIMARY and sets up original PRIMARY cluster to replicate from this newly promoted cluster.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:switchover", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.switchover", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource. For the required format, see the comment on the Cluster.name field", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}:switchover", + "request": { + "$ref": "SwitchoverClusterRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -1458,7 +1486,7 @@ } } }, - "revision": "20240605", + "revision": "20240612", "rootUrl": "https://alloydb.googleapis.com/", "schemas": { "AuthorizedNetwork": { @@ -4640,6 +4668,21 @@ }, "type": "object" }, + "SwitchoverClusterRequest": { + "description": "Message for switching over to a cluster", + "id": "SwitchoverClusterRequest", + "properties": { + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but do not actually execute the delete.", + "type": "boolean" + } + }, + "type": "object" + }, "TimeBasedRetention": { "description": "A time based retention policy specifies that all backups within a certain time period should be retained.", "id": "TimeBasedRetention", diff --git a/alloydb/v1beta/alloydb-gen.go b/alloydb/v1beta/alloydb-gen.go index 9f4b8f4b00..ef4ccfdff9 100644 --- a/alloydb/v1beta/alloydb-gen.go +++ b/alloydb/v1beta/alloydb-gen.go @@ -3596,6 +3596,42 @@ func (s *SupportedDatabaseFlag) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// SwitchoverClusterRequest: Message for switching over to a cluster +type SwitchoverClusterRequest struct { + // RequestId: Optional. An optional request ID to identify requests. Specify a + // unique request ID so that if you must retry your request, the server will + // know to ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. For example, + // consider a situation where you make an initial request and the request times + // out. If you make the request again with the same request ID, the server can + // check if original operation with the same request ID was received, and if + // so, will ignore the second request. This prevents clients from accidentally + // creating duplicate commitments. The request ID must be a valid UUID with the + // exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + // ValidateOnly: Optional. If set, performs request validation (e.g. permission + // checks and any other type of validation), but do not actually execute the + // delete. + ValidateOnly bool `json:"validateOnly,omitempty"` + // ForceSendFields is a list of field names (e.g. "RequestId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RequestId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *SwitchoverClusterRequest) MarshalJSON() ([]byte, error) { + type NoMethod SwitchoverClusterRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // TimeBasedRetention: A time based retention policy specifies that all backups // within a certain time period should be retained. type TimeBasedRetention struct { @@ -5763,6 +5799,110 @@ func (c *ProjectsLocationsClustersRestoreCall) Do(opts ...googleapi.CallOption) return ret, nil } +type ProjectsLocationsClustersSwitchoverCall struct { + s *Service + name string + switchoverclusterrequest *SwitchoverClusterRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Switchover: Switches the role of PRIMARY and SECONDARY cluster without any +// data loss. This promotes the SECONDARY cluster to PRIMARY and sets up +// original PRIMARY cluster to replicate from this newly promoted cluster. +// +// - name: The name of the resource. For the required format, see the comment +// on the Cluster.name field. +func (r *ProjectsLocationsClustersService) Switchover(name string, switchoverclusterrequest *SwitchoverClusterRequest) *ProjectsLocationsClustersSwitchoverCall { + c := &ProjectsLocationsClustersSwitchoverCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.switchoverclusterrequest = switchoverclusterrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsClustersSwitchoverCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersSwitchoverCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsClustersSwitchoverCall) Context(ctx context.Context) *ProjectsLocationsClustersSwitchoverCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsClustersSwitchoverCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersSwitchoverCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.switchoverclusterrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:switchover") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.clusters.switchover" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsClustersSwitchoverCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + type ProjectsLocationsClustersInstancesCreateCall struct { s *Service parent string diff --git a/datafusion/v1/datafusion-api.json b/datafusion/v1/datafusion-api.json index f0826f3136..540ae9f761 100644 --- a/datafusion/v1/datafusion-api.json +++ b/datafusion/v1/datafusion-api.json @@ -148,11 +148,6 @@ "location": "query", "type": "string" }, - "includeUnrevealedLocations": { - "description": "If true, the returned list will include locations which are not yet revealed.", - "location": "query", - "type": "boolean" - }, "name": { "description": "The resource that owns the locations collection, if applicable.", "location": "path", @@ -737,7 +732,7 @@ } } }, - "revision": "20240111", + "revision": "20240618", "rootUrl": "https://datafusion.googleapis.com/", "schemas": { "Accelerator": { @@ -745,7 +740,7 @@ "id": "Accelerator", "properties": { "acceleratorType": { - "description": "The type of an accelator for a CDF instance.", + "description": "Optional. The type of an accelator for a Cloud Data Fusion instance.", "enum": [ "ACCELERATOR_TYPE_UNSPECIFIED", "CDC", @@ -755,15 +750,15 @@ ], "enumDescriptions": [ "Default value, if unspecified.", - "Change Data Capture accelerator for CDF.", - "Cloud Healthcare accelerator for CDF. This accelerator is to enable Cloud Healthcare specific CDF plugins developed by Healthcare team.", + "Change Data Capture accelerator for Cloud Data Fusion.", + "Reserved for internal use.", "Contact Center AI Insights This accelerator is used to enable import and export pipelines custom built to streamline CCAI Insights processing.", - "Cloud search accelerator for CDF. This accelerator is to enable Cloud search specific CDF plugins developed by Cloudsearch team." + "Reserved for internal use." ], "type": "string" }, "state": { - "description": "The state of the accelerator.", + "description": "Output only. The state of the accelerator.", "enum": [ "STATE_UNSPECIFIED", "ENABLED", @@ -776,6 +771,7 @@ "Indicates that the accelerator is disabled and not available to use.", "Indicates that accelerator state is currently unknown. Requests for enable, disable could be retried while in this state." ], + "readOnly": true, "type": "string" } }, @@ -845,7 +841,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, @@ -868,38 +864,6 @@ }, "type": "object" }, - "DataResidencyAugmentedView": { - "description": "Next tag: 7", - "id": "DataResidencyAugmentedView", - "properties": { - "crGopoGuris": { - "description": "Cloud resource to Google owned production object mapping in the form of GURIs. The GURIs should be available in DG KB storage/cns tables. This is the preferred way of providing cloud resource mappings. For further details please read go/cloud-resource-monitoring_sig", - "items": { - "type": "string" - }, - "type": "array" - }, - "crGopoPrefixes": { - "description": "Cloud resource to Google owned production object mapping in the form of prefixes. These should be available in DG KB storage/cns tables. The entity type, which is the part of the string before the first colon in the GURI, must be completely specified in prefix. For details about GURI please read go/guri. For further details about the field please read go/cloud-resource-monitoring_sig.", - "items": { - "type": "string" - }, - "type": "array" - }, - "serviceData": { - "$ref": "ServiceData", - "description": "Service-specific data. Only required for pre-determined services. Generally used to bind a Cloud Resource to some a TI container that uniquely specifies a customer. See milestone 2 of DRZ KR8 SIG for more information." - }, - "tpIds": { - "description": "The list of project_id's of the tenant projects in the 'google.com' org which serve the Cloud Resource. See go/drz-mst-sig for more details.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "DnsPeering": { "description": "DNS peering configuration. These configurations are used to create DNS peering with the customer Cloud DNS.", "id": "DnsPeering", @@ -1070,6 +1034,10 @@ "description": "The resource labels for instance to use to annotate any related underlying resources such as Compute Engine VMs. The character '=' is not allowed to be used within the labels.", "type": "object" }, + "maintenancePolicy": { + "$ref": "MaintenancePolicy", + "description": "Optional. Configure the maintenance policy for this instance." + }, "name": { "description": "Output only. The name of this instance is in the form of projects/{project}/locations/{location}/instances/{instance}.", "readOnly": true, @@ -1087,7 +1055,7 @@ "type": "object" }, "p4ServiceAccount": { - "description": "Output only. P4 service account for the customer project.", + "description": "Output only. Service agent for the customer project.", "readOnly": true, "type": "string" }, @@ -1325,6 +1293,32 @@ }, "type": "object" }, + "MaintenancePolicy": { + "description": "Maintenance policy of the instance.", + "id": "MaintenancePolicy", + "properties": { + "maintenanceExclusionWindow": { + "$ref": "TimeWindow", + "description": "Optional. The maintenance exclusion window of the instance." + }, + "maintenanceWindow": { + "$ref": "MaintenanceWindow", + "description": "Optional. The maintenance window of the instance." + } + }, + "type": "object" + }, + "MaintenanceWindow": { + "description": "Maintenance window of the instance.", + "id": "MaintenanceWindow", + "properties": { + "recurringTimeWindow": { + "$ref": "RecurringTimeWindow", + "description": "Required. The recurring time window of the maintenance window." + } + }, + "type": "object" + }, "NetworkConfig": { "description": "Network configuration for a Data Fusion instance. These configurations are used for peering with the customer network. Configurations are optional when a public Data Fusion instance is to be created. However, providing these configurations allows several benefits, such as reduced network latency while accessing the customer resources from managed Data Fusion instance nodes, as well as access to the customer on-prem resources.", "id": "NetworkConfig", @@ -1348,7 +1342,7 @@ "type": "string" }, "network": { - "description": "Optional. Name of the network in the customer project with which the Tenant Project will be peered for executing pipelines. This is required only when using connection type VPC peering. In case of shared VPC where the network resides in another host project the network should specified in the form of projects/{host-project-id}/global/networks/{network}. This is only required for connectivity type VPC_PEERING.", + "description": "Optional. Name of the network in the customer project with which the Tenant Project will be peered for executing pipelines. In case of shared VPC where the network resides in another host project the network should specified in the form of projects/{host-project-id}/global/networks/{network}. This is only required for connectivity type VPC_PEERING.", "type": "string" }, "privateServiceConnectConfig": { @@ -1437,27 +1431,6 @@ }, "type": "object" }, - "PersistentDiskData": { - "description": "Persistent Disk service-specific Data. Contains information that may not be appropriate for the generic DRZ Augmented View. This currently includes LSV Colossus Roots and GCS Buckets.", - "id": "PersistentDiskData", - "properties": { - "cfsRoots": { - "description": "Path to Colossus root for an LSV. NOTE: Unlike `cr_ti_guris` and `cr_ti_prefixes`, the field `cfs_roots` below does not need to be a GUri or GUri prefix. It can simply be any valid CFS or CFS2 Path. The DRZ KR8 SIG has more details overall, but generally the `cfs_roots` provided here should be scoped to an individual Persistent Disk. An example for a PD Disk with a disk ID 3277719120423414466, follows: * `cr_ti_guris` could be ‘/cfs2/pj/pd-cloud-prod’ as this is a valid GUri present in the DG KB and contains enough information to perform location monitoring and scope ownership of the Production Object. * `cfs_roots` would be: ‘/cfs2/pj/pd-cloud-staging/lsv000001234@/ lsv/projects~773365403387~zones~2700~disks~3277719120423414466 ~bank-blue-careful-3526-lsv00054DB1B7254BA3/’ as this allows us to enumerate the files on CFS2 that belong to an individual Disk.", - "items": { - "type": "string" - }, - "type": "array" - }, - "gcsBucketNames": { - "description": "The GCS Buckets that back this snapshot or image. This is required as `cr_ti_prefixes` and `cr_ti_guris` only accept TI resources. This should be the globally unique bucket name.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "Policy": { "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", @@ -1509,23 +1482,27 @@ }, "type": "object" }, + "RecurringTimeWindow": { + "description": "Represents an arbitrary window of time that recurs.", + "id": "RecurringTimeWindow", + "properties": { + "recurrence": { + "description": "Required. An RRULE with format [RFC-5545](https://tools.ietf.org/html/rfc5545#section-3.8.5.3) for how this window reccurs. They go on for the span of time between the start and end time. The only supported FREQ value is \"WEEKLY\". To have something repeat every weekday, use: \"FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR\". This specifies how frequently the window starts. To have a 9 am - 5 pm UTC-4 window every weekday, use something like: ``` start time = 2019-01-01T09:00:00-0400 end time = 2019-01-01T17:00:00-0400 recurrence = FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR ```", + "type": "string" + }, + "window": { + "$ref": "TimeWindow", + "description": "Required. The window representing the start and end time of recurrences. This field ignores the date components of the provided timestamps. Only the time of day and duration between start and end time are relevant." + } + }, + "type": "object" + }, "RestartInstanceRequest": { "description": "Request message for restarting a Data Fusion instance.", "id": "RestartInstanceRequest", "properties": {}, "type": "object" }, - "ServiceData": { - "description": "This message defines service-specific data that certain service teams must provide as part of the Data Residency Augmented View for a resource. Next ID: 2", - "id": "ServiceData", - "properties": { - "pd": { - "$ref": "PersistentDiskData", - "description": "Auxiliary data for the persistent disk pipeline provided to provide the LSV Colossus Roots and GCS Buckets." - } - }, - "type": "object" - }, "SetIamPolicyRequest": { "description": "Request message for `SetIamPolicy` method.", "id": "SetIamPolicyRequest", @@ -1597,6 +1574,23 @@ }, "type": "object" }, + "TimeWindow": { + "description": "Represents an arbitrary window of time.", + "id": "TimeWindow", + "properties": { + "endTime": { + "description": "Required. The end time of the time window provided in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. The end time should take place after the start time. Example: \"2024-01-02T12:04:06-06:00\"", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Required. The start time of the time window provided in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. Example: \"2024-01-01T12:04:06-04:00\"", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "Version": { "description": "The Data Fusion version. This proto message stores information about certain Data Fusion version, which is used for Data Fusion version upgrade.", "id": "Version", diff --git a/datafusion/v1/datafusion-gen.go b/datafusion/v1/datafusion-gen.go index a96f43ab98..138ae022af 100644 --- a/datafusion/v1/datafusion-gen.go +++ b/datafusion/v1/datafusion-gen.go @@ -225,21 +225,19 @@ type ProjectsLocationsVersionsService struct { // Accelerator: Identifies Data Fusion accelerators for an instance. type Accelerator struct { - // AcceleratorType: The type of an accelator for a CDF instance. + // AcceleratorType: Optional. The type of an accelator for a Cloud Data Fusion + // instance. // // Possible values: // "ACCELERATOR_TYPE_UNSPECIFIED" - Default value, if unspecified. - // "CDC" - Change Data Capture accelerator for CDF. - // "HEALTHCARE" - Cloud Healthcare accelerator for CDF. This accelerator is - // to enable Cloud Healthcare specific CDF plugins developed by Healthcare - // team. + // "CDC" - Change Data Capture accelerator for Cloud Data Fusion. + // "HEALTHCARE" - Reserved for internal use. // "CCAI_INSIGHTS" - Contact Center AI Insights This accelerator is used to // enable import and export pipelines custom built to streamline CCAI Insights // processing. - // "CLOUDSEARCH" - Cloud search accelerator for CDF. This accelerator is to - // enable Cloud search specific CDF plugins developed by Cloudsearch team. + // "CLOUDSEARCH" - Reserved for internal use. AcceleratorType string `json:"acceleratorType,omitempty"` - // State: The state of the accelerator. + // State: Output only. The state of the accelerator. // // Possible values: // "STATE_UNSPECIFIED" - Default value, do not use. @@ -419,7 +417,11 @@ type Binding struct { // ol-id/subject/my-subject-attribute-value`. Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. For - // example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview + // of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to // unconditionally include in API requests. By default, fields with empty or @@ -468,46 +470,6 @@ func (s *CryptoKeyConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// DataResidencyAugmentedView: Next tag: 7 -type DataResidencyAugmentedView struct { - // CrGopoGuris: Cloud resource to Google owned production object mapping in the - // form of GURIs. The GURIs should be available in DG KB storage/cns tables. - // This is the preferred way of providing cloud resource mappings. For further - // details please read go/cloud-resource-monitoring_sig - CrGopoGuris []string `json:"crGopoGuris,omitempty"` - // CrGopoPrefixes: Cloud resource to Google owned production object mapping in - // the form of prefixes. These should be available in DG KB storage/cns tables. - // The entity type, which is the part of the string before the first colon in - // the GURI, must be completely specified in prefix. For details about GURI - // please read go/guri. For further details about the field please read - // go/cloud-resource-monitoring_sig. - CrGopoPrefixes []string `json:"crGopoPrefixes,omitempty"` - // ServiceData: Service-specific data. Only required for pre-determined - // services. Generally used to bind a Cloud Resource to some a TI container - // that uniquely specifies a customer. See milestone 2 of DRZ KR8 SIG for more - // information. - ServiceData *ServiceData `json:"serviceData,omitempty"` - // TpIds: The list of project_id's of the tenant projects in the 'google.com' - // org which serve the Cloud Resource. See go/drz-mst-sig for more details. - TpIds []string `json:"tpIds,omitempty"` - // ForceSendFields is a list of field names (e.g. "CrGopoGuris") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CrGopoGuris") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s *DataResidencyAugmentedView) MarshalJSON() ([]byte, error) { - type NoMethod DataResidencyAugmentedView - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // DnsPeering: DNS peering configuration. These configurations are used to // create DNS peering with the customer Cloud DNS. type DnsPeering struct { @@ -680,6 +642,9 @@ type Instance struct { // underlying resources such as Compute Engine VMs. The character '=' is not // allowed to be used within the labels. Labels map[string]string `json:"labels,omitempty"` + // MaintenancePolicy: Optional. Configure the maintenance policy for this + // instance. + MaintenancePolicy *MaintenancePolicy `json:"maintenancePolicy,omitempty"` // Name: Output only. The name of this instance is in the form of // projects/{project}/locations/{location}/instances/{instance}. Name string `json:"name,omitempty"` @@ -689,7 +654,7 @@ type Instance struct { // Options: Map of additional options used to configure the behavior of Data // Fusion instance. Options map[string]string `json:"options,omitempty"` - // P4ServiceAccount: Output only. P4 service account for the customer project. + // P4ServiceAccount: Output only. Service agent for the customer project. P4ServiceAccount string `json:"p4ServiceAccount,omitempty"` // PatchRevision: Optional. Current patch revision of the Data Fusion. PatchRevision string `json:"patchRevision,omitempty"` @@ -954,6 +919,54 @@ func (s *Location) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// MaintenancePolicy: Maintenance policy of the instance. +type MaintenancePolicy struct { + // MaintenanceExclusionWindow: Optional. The maintenance exclusion window of + // the instance. + MaintenanceExclusionWindow *TimeWindow `json:"maintenanceExclusionWindow,omitempty"` + // MaintenanceWindow: Optional. The maintenance window of the instance. + MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaintenanceExclusionWindow") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaintenanceExclusionWindow") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *MaintenancePolicy) MarshalJSON() ([]byte, error) { + type NoMethod MaintenancePolicy + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// MaintenanceWindow: Maintenance window of the instance. +type MaintenanceWindow struct { + // RecurringTimeWindow: Required. The recurring time window of the maintenance + // window. + RecurringTimeWindow *RecurringTimeWindow `json:"recurringTimeWindow,omitempty"` + // ForceSendFields is a list of field names (e.g. "RecurringTimeWindow") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RecurringTimeWindow") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) { + type NoMethod MaintenanceWindow + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // NetworkConfig: Network configuration for a Data Fusion instance. These // configurations are used for peering with the customer network. // Configurations are optional when a public Data Fusion instance is to be @@ -983,11 +996,11 @@ type NetworkConfig struct { // 192.168.0.0/22 IpAllocation string `json:"ipAllocation,omitempty"` // Network: Optional. Name of the network in the customer project with which - // the Tenant Project will be peered for executing pipelines. This is required - // only when using connection type VPC peering. In case of shared VPC where the - // network resides in another host project the network should specified in the - // form of projects/{host-project-id}/global/networks/{network}. This is only - // required for connectivity type VPC_PEERING. + // the Tenant Project will be peered for executing pipelines. In case of shared + // VPC where the network resides in another host project the network should + // specified in the form of + // projects/{host-project-id}/global/networks/{network}. This is only required + // for connectivity type VPC_PEERING. Network string `json:"network,omitempty"` // PrivateServiceConnectConfig: Optional. Configuration for Private Service // Connect. This is required only when using connection type @@ -1100,46 +1113,6 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// PersistentDiskData: Persistent Disk service-specific Data. Contains -// information that may not be appropriate for the generic DRZ Augmented View. -// This currently includes LSV Colossus Roots and GCS Buckets. -type PersistentDiskData struct { - // CfsRoots: Path to Colossus root for an LSV. NOTE: Unlike `cr_ti_guris` and - // `cr_ti_prefixes`, the field `cfs_roots` below does not need to be a GUri or - // GUri prefix. It can simply be any valid CFS or CFS2 Path. The DRZ KR8 SIG - // has more details overall, but generally the `cfs_roots` provided here should - // be scoped to an individual Persistent Disk. An example for a PD Disk with a - // disk ID 3277719120423414466, follows: * `cr_ti_guris` could be - // ‘/cfs2/pj/pd-cloud-prod’ as this is a valid GUri present in the DG KB - // and contains enough information to perform location monitoring and scope - // ownership of the Production Object. * `cfs_roots` would be: - // ‘/cfs2/pj/pd-cloud-staging/lsv000001234@/ - // lsv/projects~773365403387~zones~2700~disks~3277719120423414466 - // ~bank-blue-careful-3526-lsv00054DB1B7254BA3/’ as this allows us to - // enumerate the files on CFS2 that belong to an individual Disk. - CfsRoots []string `json:"cfsRoots,omitempty"` - // GcsBucketNames: The GCS Buckets that back this snapshot or image. This is - // required as `cr_ti_prefixes` and `cr_ti_guris` only accept TI resources. - // This should be the globally unique bucket name. - GcsBucketNames []string `json:"gcsBucketNames,omitempty"` - // ForceSendFields is a list of field names (e.g. "CfsRoots") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CfsRoots") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s *PersistentDiskData) MarshalJSON() ([]byte, error) { - type NoMethod PersistentDiskData - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // Policy: An Identity and Access Management (IAM) policy, which specifies // access controls for Google Cloud resources. A `Policy` is a collection of // `bindings`. A `binding` binds one or more `members`, or principals, to a @@ -1273,36 +1246,46 @@ func (s *PrivateServiceConnectConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// RestartInstanceRequest: Request message for restarting a Data Fusion -// instance. -type RestartInstanceRequest struct { -} - -// ServiceData: This message defines service-specific data that certain service -// teams must provide as part of the Data Residency Augmented View for a -// resource. Next ID: 2 -type ServiceData struct { - // Pd: Auxiliary data for the persistent disk pipeline provided to provide the - // LSV Colossus Roots and GCS Buckets. - Pd *PersistentDiskData `json:"pd,omitempty"` - // ForceSendFields is a list of field names (e.g. "Pd") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// RecurringTimeWindow: Represents an arbitrary window of time that recurs. +type RecurringTimeWindow struct { + // Recurrence: Required. An RRULE with format RFC-5545 + // (https://tools.ietf.org/html/rfc5545#section-3.8.5.3) for how this window + // reccurs. They go on for the span of time between the start and end time. The + // only supported FREQ value is "WEEKLY". To have something repeat every + // weekday, use: "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR". This specifies how + // frequently the window starts. To have a 9 am - 5 pm UTC-4 window every + // weekday, use something like: ``` start time = 2019-01-01T09:00:00-0400 end + // time = 2019-01-01T17:00:00-0400 recurrence = + // FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR ``` + Recurrence string `json:"recurrence,omitempty"` + // Window: Required. The window representing the start and end time of + // recurrences. This field ignores the date components of the provided + // timestamps. Only the time of day and duration between start and end time are + // relevant. + Window *TimeWindow `json:"window,omitempty"` + // ForceSendFields is a list of field names (e.g. "Recurrence") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Pd") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "Recurrence") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *ServiceData) MarshalJSON() ([]byte, error) { - type NoMethod ServiceData +func (s *RecurringTimeWindow) MarshalJSON() ([]byte, error) { + type NoMethod RecurringTimeWindow return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// RestartInstanceRequest: Request message for restarting a Data Fusion +// instance. +type RestartInstanceRequest struct { +} + // SetIamPolicyRequest: Request message for `SetIamPolicy` method. type SetIamPolicyRequest struct { // Policy: REQUIRED: The complete policy to be applied to the `resource`. The @@ -1418,6 +1401,34 @@ func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// TimeWindow: Represents an arbitrary window of time. +type TimeWindow struct { + // EndTime: Required. The end time of the time window provided in RFC 3339 + // (https://www.ietf.org/rfc/rfc3339.txt) format. The end time should take + // place after the start time. Example: "2024-01-02T12:04:06-06:00" + EndTime string `json:"endTime,omitempty"` + // StartTime: Required. The start time of the time window provided in RFC 3339 + // (https://www.ietf.org/rfc/rfc3339.txt) format. Example: + // "2024-01-01T12:04:06-04:00" + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *TimeWindow) MarshalJSON() ([]byte, error) { + type NoMethod TimeWindow + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // Version: The Data Fusion version. This proto message stores information // about certain Data Fusion version, which is used for Data Fusion version // upgrade. @@ -1590,14 +1601,6 @@ func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsList return c } -// IncludeUnrevealedLocations sets the optional parameter -// "includeUnrevealedLocations": If true, the returned list will include -// locations which are not yet revealed. -func (c *ProjectsLocationsListCall) IncludeUnrevealedLocations(includeUnrevealedLocations bool) *ProjectsLocationsListCall { - c.urlParams_.Set("includeUnrevealedLocations", fmt.Sprint(includeUnrevealedLocations)) - return c -} - // PageSize sets the optional parameter "pageSize": The maximum number of // results to return. If not set, the service selects a default. func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { diff --git a/datafusion/v1beta1/datafusion-api.json b/datafusion/v1beta1/datafusion-api.json index cf40a2298b..f7595fd47d 100644 --- a/datafusion/v1beta1/datafusion-api.json +++ b/datafusion/v1beta1/datafusion-api.json @@ -148,11 +148,6 @@ "location": "query", "type": "string" }, - "includeUnrevealedLocations": { - "description": "If true, the returned list will include locations which are not yet revealed.", - "location": "query", - "type": "boolean" - }, "name": { "description": "The resource that owns the locations collection, if applicable.", "location": "path", @@ -935,15 +930,15 @@ } } }, - "revision": "20240111", + "revision": "20240618", "rootUrl": "https://datafusion.googleapis.com/", "schemas": { "Accelerator": { - "description": "Identifies Data Fusion accelerators for an instance.", + "description": "Identifies Cloud Data Fusion accelerators for an instance.", "id": "Accelerator", "properties": { "acceleratorType": { - "description": "The type of an accelator for a CDF instance.", + "description": "Optional. The type of an accelator for a Cloud Data Fusion instance.", "enum": [ "ACCELERATOR_TYPE_UNSPECIFIED", "CDC", @@ -953,15 +948,15 @@ ], "enumDescriptions": [ "Default value, if unspecified.", - "Change Data Capture accelerator for CDF.", - "Cloud Healthcare accelerator for CDF. This accelerator is to enable Cloud Healthcare specific CDF plugins developed by Healthcare team.", + "Change Data Capture accelerator for Cloud Data Fusion.", + "Reserved for internal use.", "Contact Center AI Insights This accelerator is used to enable import and export pipelines custom built to streamline CCAI Insights processing.", - "Cloud search accelerator for CDF. This accelerator is to enable Cloud search specific CDF plugins developed by Cloudsearch team." + "Reserved for internal use." ], "type": "string" }, "state": { - "description": "The state of the accelerator.", + "description": "Output only. The state of the accelerator.", "enum": [ "STATE_UNSPECIFIED", "ENABLED", @@ -974,6 +969,7 @@ "Indicates that the accelerator is disabled and not available to use.", "Indicates that accelerator state is currently unknown. Requests for enable, disable could be retried while in this state." ], + "readOnly": true, "type": "string" } }, @@ -1043,7 +1039,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, @@ -1066,38 +1062,6 @@ }, "type": "object" }, - "DataResidencyAugmentedView": { - "description": "Next tag: 7", - "id": "DataResidencyAugmentedView", - "properties": { - "crGopoGuris": { - "description": "Cloud resource to Google owned production object mapping in the form of GURIs. The GURIs should be available in DG KB storage/cns tables. This is the preferred way of providing cloud resource mappings. For further details please read go/cloud-resource-monitoring_sig", - "items": { - "type": "string" - }, - "type": "array" - }, - "crGopoPrefixes": { - "description": "Cloud resource to Google owned production object mapping in the form of prefixes. These should be available in DG KB storage/cns tables. The entity type, which is the part of the string before the first colon in the GURI, must be completely specified in prefix. For details about GURI please read go/guri. For further details about the field please read go/cloud-resource-monitoring_sig.", - "items": { - "type": "string" - }, - "type": "array" - }, - "serviceData": { - "$ref": "ServiceData", - "description": "Service-specific data. Only required for pre-determined services. Generally used to bind a Cloud Resource to some a TI container that uniquely specifies a customer. See milestone 2 of DRZ KR8 SIG for more information." - }, - "tpIds": { - "description": "The list of project_id's of the tenant projects in the 'google.com' org which serve the Cloud Resource. See go/drz-mst-sig for more details.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "DnsPeering": { "description": "DNS peering configuration. These configurations are used to create DNS peering with the customer Cloud DNS.", "id": "DnsPeering", @@ -1283,6 +1247,10 @@ "description": "The resource labels for instance to use to annotate any related underlying resources such as Compute Engine VMs. The character '=' is not allowed to be used within the labels.", "type": "object" }, + "maintenancePolicy": { + "$ref": "MaintenancePolicy", + "description": "Optional. Configure the maintenance policy for this instance." + }, "name": { "description": "Output only. The name of this instance is in the form of projects/{project}/locations/{location}/instances/{instance}.", "readOnly": true, @@ -1300,7 +1268,7 @@ "type": "object" }, "p4ServiceAccount": { - "description": "Output only. P4 service account for the customer project.", + "description": "Output only. Service agent for the customer project.", "readOnly": true, "type": "string" }, @@ -1556,6 +1524,32 @@ }, "type": "object" }, + "MaintenancePolicy": { + "description": "Maintenance policy of the instance.", + "id": "MaintenancePolicy", + "properties": { + "maintenanceExclusionWindow": { + "$ref": "TimeWindow", + "description": "Optional. The maintenance exclusion window of the instance." + }, + "maintenanceWindow": { + "$ref": "MaintenanceWindow", + "description": "Optional. The maintenance window of the instance." + } + }, + "type": "object" + }, + "MaintenanceWindow": { + "description": "Maintenance window of the instance.", + "id": "MaintenanceWindow", + "properties": { + "recurringTimeWindow": { + "$ref": "RecurringTimeWindow", + "description": "Required. The recurring time window of the maintenance window." + } + }, + "type": "object" + }, "Namespace": { "description": "Represents the information of a namespace", "id": "Namespace", @@ -1594,7 +1588,7 @@ "type": "string" }, "network": { - "description": "Optional. Name of the network in the customer project with which the Tenant Project will be peered for executing pipelines. This is required only when using connection type VPC peering. In case of shared VPC where the network resides in another host project the network should specified in the form of projects/{host-project-id}/global/networks/{network}. This is only required for connectivity type VPC_PEERING.", + "description": "Optional. Name of the network in the customer project with which the Tenant Project will be peered for executing pipelines. In case of shared VPC where the network resides in another host project the network should specified in the form of projects/{host-project-id}/global/networks/{network}. This is only required for connectivity type VPC_PEERING.", "type": "string" }, "privateServiceConnectConfig": { @@ -1683,27 +1677,6 @@ }, "type": "object" }, - "PersistentDiskData": { - "description": "Persistent Disk service-specific Data. Contains information that may not be appropriate for the generic DRZ Augmented View. This currently includes LSV Colossus Roots and GCS Buckets.", - "id": "PersistentDiskData", - "properties": { - "cfsRoots": { - "description": "Path to Colossus root for an LSV. NOTE: Unlike `cr_ti_guris` and `cr_ti_prefixes`, the field `cfs_roots` below does not need to be a GUri or GUri prefix. It can simply be any valid CFS or CFS2 Path. The DRZ KR8 SIG has more details overall, but generally the `cfs_roots` provided here should be scoped to an individual Persistent Disk. An example for a PD Disk with a disk ID 3277719120423414466, follows: * `cr_ti_guris` could be ‘/cfs2/pj/pd-cloud-prod’ as this is a valid GUri present in the DG KB and contains enough information to perform location monitoring and scope ownership of the Production Object. * `cfs_roots` would be: ‘/cfs2/pj/pd-cloud-staging/lsv000001234@/ lsv/projects~773365403387~zones~2700~disks~3277719120423414466 ~bank-blue-careful-3526-lsv00054DB1B7254BA3/’ as this allows us to enumerate the files on CFS2 that belong to an individual Disk.", - "items": { - "type": "string" - }, - "type": "array" - }, - "gcsBucketNames": { - "description": "The GCS Buckets that back this snapshot or image. This is required as `cr_ti_prefixes` and `cr_ti_guris` only accept TI resources. This should be the globally unique bucket name.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "Policy": { "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", @@ -1755,6 +1728,21 @@ }, "type": "object" }, + "RecurringTimeWindow": { + "description": "Represents an arbitrary window of time that recurs.", + "id": "RecurringTimeWindow", + "properties": { + "recurrence": { + "description": "Required. An RRULE with format [RFC-5545](https://tools.ietf.org/html/rfc5545#section-3.8.5.3) for how this window reccurs. They go on for the span of time between the start and end time. The only supported FREQ value is \"WEEKLY\". To have something repeat every weekday, use: \"FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR\". This specifies how frequently the window starts. To have a 9 am - 5 pm UTC-4 window every weekday, use something like: ``` start time = 2019-01-01T09:00:00-0400 end time = 2019-01-01T17:00:00-0400 recurrence = FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR ```", + "type": "string" + }, + "window": { + "$ref": "TimeWindow", + "description": "Required. The window representing the start and end time of recurrences. This field ignores the date components of the provided timestamps. Only the time of day and duration between start and end time are relevant." + } + }, + "type": "object" + }, "RemoveIamPolicyRequest": { "description": "Request message for RemoveIamPolicy method.", "id": "RemoveIamPolicyRequest", @@ -1773,17 +1761,6 @@ "properties": {}, "type": "object" }, - "ServiceData": { - "description": "This message defines service-specific data that certain service teams must provide as part of the Data Residency Augmented View for a resource. Next ID: 2", - "id": "ServiceData", - "properties": { - "pd": { - "$ref": "PersistentDiskData", - "description": "Auxiliary data for the persistent disk pipeline provided to provide the LSV Colossus Roots and GCS Buckets." - } - }, - "type": "object" - }, "SetIamPolicyRequest": { "description": "Request message for `SetIamPolicy` method.", "id": "SetIamPolicyRequest", @@ -1855,6 +1832,23 @@ }, "type": "object" }, + "TimeWindow": { + "description": "Represents an arbitrary window of time.", + "id": "TimeWindow", + "properties": { + "endTime": { + "description": "Required. The end time of the time window provided in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. The end time should take place after the start time. Example: \"2024-01-02T12:04:06-06:00\"", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Required. The start time of the time window provided in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. Example: \"2024-01-01T12:04:06-04:00\"", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "UpgradeInstanceRequest": { "description": "Request message for upgrading a Data Fusion instance. To change the instance properties, instance update should be used.", "id": "UpgradeInstanceRequest", diff --git a/datafusion/v1beta1/datafusion-gen.go b/datafusion/v1beta1/datafusion-gen.go index 2dffb93e23..4dfc5b8606 100644 --- a/datafusion/v1beta1/datafusion-gen.go +++ b/datafusion/v1beta1/datafusion-gen.go @@ -235,23 +235,21 @@ type ProjectsLocationsVersionsService struct { s *Service } -// Accelerator: Identifies Data Fusion accelerators for an instance. +// Accelerator: Identifies Cloud Data Fusion accelerators for an instance. type Accelerator struct { - // AcceleratorType: The type of an accelator for a CDF instance. + // AcceleratorType: Optional. The type of an accelator for a Cloud Data Fusion + // instance. // // Possible values: // "ACCELERATOR_TYPE_UNSPECIFIED" - Default value, if unspecified. - // "CDC" - Change Data Capture accelerator for CDF. - // "HEALTHCARE" - Cloud Healthcare accelerator for CDF. This accelerator is - // to enable Cloud Healthcare specific CDF plugins developed by Healthcare - // team. + // "CDC" - Change Data Capture accelerator for Cloud Data Fusion. + // "HEALTHCARE" - Reserved for internal use. // "CCAI_INSIGHTS" - Contact Center AI Insights This accelerator is used to // enable import and export pipelines custom built to streamline CCAI Insights // processing. - // "CLOUDSEARCH" - Cloud search accelerator for CDF. This accelerator is to - // enable Cloud search specific CDF plugins developed by Cloudsearch team. + // "CLOUDSEARCH" - Reserved for internal use. AcceleratorType string `json:"acceleratorType,omitempty"` - // State: The state of the accelerator. + // State: Output only. The state of the accelerator. // // Possible values: // "STATE_UNSPECIFIED" - Default value, do not use. @@ -431,7 +429,11 @@ type Binding struct { // ol-id/subject/my-subject-attribute-value`. Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. For - // example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview + // of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to // unconditionally include in API requests. By default, fields with empty or @@ -480,46 +482,6 @@ func (s *CryptoKeyConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// DataResidencyAugmentedView: Next tag: 7 -type DataResidencyAugmentedView struct { - // CrGopoGuris: Cloud resource to Google owned production object mapping in the - // form of GURIs. The GURIs should be available in DG KB storage/cns tables. - // This is the preferred way of providing cloud resource mappings. For further - // details please read go/cloud-resource-monitoring_sig - CrGopoGuris []string `json:"crGopoGuris,omitempty"` - // CrGopoPrefixes: Cloud resource to Google owned production object mapping in - // the form of prefixes. These should be available in DG KB storage/cns tables. - // The entity type, which is the part of the string before the first colon in - // the GURI, must be completely specified in prefix. For details about GURI - // please read go/guri. For further details about the field please read - // go/cloud-resource-monitoring_sig. - CrGopoPrefixes []string `json:"crGopoPrefixes,omitempty"` - // ServiceData: Service-specific data. Only required for pre-determined - // services. Generally used to bind a Cloud Resource to some a TI container - // that uniquely specifies a customer. See milestone 2 of DRZ KR8 SIG for more - // information. - ServiceData *ServiceData `json:"serviceData,omitempty"` - // TpIds: The list of project_id's of the tenant projects in the 'google.com' - // org which serve the Cloud Resource. See go/drz-mst-sig for more details. - TpIds []string `json:"tpIds,omitempty"` - // ForceSendFields is a list of field names (e.g. "CrGopoGuris") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CrGopoGuris") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s *DataResidencyAugmentedView) MarshalJSON() ([]byte, error) { - type NoMethod DataResidencyAugmentedView - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // DnsPeering: DNS peering configuration. These configurations are used to // create DNS peering with the customer Cloud DNS. type DnsPeering struct { @@ -718,6 +680,9 @@ type Instance struct { // underlying resources such as Compute Engine VMs. The character '=' is not // allowed to be used within the labels. Labels map[string]string `json:"labels,omitempty"` + // MaintenancePolicy: Optional. Configure the maintenance policy for this + // instance. + MaintenancePolicy *MaintenancePolicy `json:"maintenancePolicy,omitempty"` // Name: Output only. The name of this instance is in the form of // projects/{project}/locations/{location}/instances/{instance}. Name string `json:"name,omitempty"` @@ -727,7 +692,7 @@ type Instance struct { // Options: Map of additional options used to configure the behavior of Data // Fusion instance. Options map[string]string `json:"options,omitempty"` - // P4ServiceAccount: Output only. P4 service account for the customer project. + // P4ServiceAccount: Output only. Service agent for the customer project. P4ServiceAccount string `json:"p4ServiceAccount,omitempty"` // PatchRevision: Optional. Current patch revision of the Data Fusion. PatchRevision string `json:"patchRevision,omitempty"` @@ -1019,6 +984,54 @@ func (s *Location) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// MaintenancePolicy: Maintenance policy of the instance. +type MaintenancePolicy struct { + // MaintenanceExclusionWindow: Optional. The maintenance exclusion window of + // the instance. + MaintenanceExclusionWindow *TimeWindow `json:"maintenanceExclusionWindow,omitempty"` + // MaintenanceWindow: Optional. The maintenance window of the instance. + MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaintenanceExclusionWindow") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaintenanceExclusionWindow") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *MaintenancePolicy) MarshalJSON() ([]byte, error) { + type NoMethod MaintenancePolicy + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// MaintenanceWindow: Maintenance window of the instance. +type MaintenanceWindow struct { + // RecurringTimeWindow: Required. The recurring time window of the maintenance + // window. + RecurringTimeWindow *RecurringTimeWindow `json:"recurringTimeWindow,omitempty"` + // ForceSendFields is a list of field names (e.g. "RecurringTimeWindow") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RecurringTimeWindow") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) { + type NoMethod MaintenanceWindow + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // Namespace: Represents the information of a namespace type Namespace struct { // IamPolicy: IAM policy associated with this namespace. @@ -1072,11 +1085,11 @@ type NetworkConfig struct { // 192.168.0.0/22 IpAllocation string `json:"ipAllocation,omitempty"` // Network: Optional. Name of the network in the customer project with which - // the Tenant Project will be peered for executing pipelines. This is required - // only when using connection type VPC peering. In case of shared VPC where the - // network resides in another host project the network should specified in the - // form of projects/{host-project-id}/global/networks/{network}. This is only - // required for connectivity type VPC_PEERING. + // the Tenant Project will be peered for executing pipelines. In case of shared + // VPC where the network resides in another host project the network should + // specified in the form of + // projects/{host-project-id}/global/networks/{network}. This is only required + // for connectivity type VPC_PEERING. Network string `json:"network,omitempty"` // PrivateServiceConnectConfig: Optional. Configuration for Private Service // Connect. This is required only when using connection type @@ -1189,46 +1202,6 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// PersistentDiskData: Persistent Disk service-specific Data. Contains -// information that may not be appropriate for the generic DRZ Augmented View. -// This currently includes LSV Colossus Roots and GCS Buckets. -type PersistentDiskData struct { - // CfsRoots: Path to Colossus root for an LSV. NOTE: Unlike `cr_ti_guris` and - // `cr_ti_prefixes`, the field `cfs_roots` below does not need to be a GUri or - // GUri prefix. It can simply be any valid CFS or CFS2 Path. The DRZ KR8 SIG - // has more details overall, but generally the `cfs_roots` provided here should - // be scoped to an individual Persistent Disk. An example for a PD Disk with a - // disk ID 3277719120423414466, follows: * `cr_ti_guris` could be - // ‘/cfs2/pj/pd-cloud-prod’ as this is a valid GUri present in the DG KB - // and contains enough information to perform location monitoring and scope - // ownership of the Production Object. * `cfs_roots` would be: - // ‘/cfs2/pj/pd-cloud-staging/lsv000001234@/ - // lsv/projects~773365403387~zones~2700~disks~3277719120423414466 - // ~bank-blue-careful-3526-lsv00054DB1B7254BA3/’ as this allows us to - // enumerate the files on CFS2 that belong to an individual Disk. - CfsRoots []string `json:"cfsRoots,omitempty"` - // GcsBucketNames: The GCS Buckets that back this snapshot or image. This is - // required as `cr_ti_prefixes` and `cr_ti_guris` only accept TI resources. - // This should be the globally unique bucket name. - GcsBucketNames []string `json:"gcsBucketNames,omitempty"` - // ForceSendFields is a list of field names (e.g. "CfsRoots") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CfsRoots") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s *PersistentDiskData) MarshalJSON() ([]byte, error) { - type NoMethod PersistentDiskData - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // Policy: An Identity and Access Management (IAM) policy, which specifies // access controls for Google Cloud resources. A `Policy` is a collection of // `bindings`. A `binding` binds one or more `members`, or principals, to a @@ -1362,6 +1335,41 @@ func (s *PrivateServiceConnectConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// RecurringTimeWindow: Represents an arbitrary window of time that recurs. +type RecurringTimeWindow struct { + // Recurrence: Required. An RRULE with format RFC-5545 + // (https://tools.ietf.org/html/rfc5545#section-3.8.5.3) for how this window + // reccurs. They go on for the span of time between the start and end time. The + // only supported FREQ value is "WEEKLY". To have something repeat every + // weekday, use: "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR". This specifies how + // frequently the window starts. To have a 9 am - 5 pm UTC-4 window every + // weekday, use something like: ``` start time = 2019-01-01T09:00:00-0400 end + // time = 2019-01-01T17:00:00-0400 recurrence = + // FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR ``` + Recurrence string `json:"recurrence,omitempty"` + // Window: Required. The window representing the start and end time of + // recurrences. This field ignores the date components of the provided + // timestamps. Only the time of day and duration between start and end time are + // relevant. + Window *TimeWindow `json:"window,omitempty"` + // ForceSendFields is a list of field names (e.g. "Recurrence") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Recurrence") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *RecurringTimeWindow) MarshalJSON() ([]byte, error) { + type NoMethod RecurringTimeWindow + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // RemoveIamPolicyRequest: Request message for RemoveIamPolicy method. type RemoveIamPolicyRequest struct { } @@ -1377,31 +1385,6 @@ type RemoveIamPolicyResponse struct { type RestartInstanceRequest struct { } -// ServiceData: This message defines service-specific data that certain service -// teams must provide as part of the Data Residency Augmented View for a -// resource. Next ID: 2 -type ServiceData struct { - // Pd: Auxiliary data for the persistent disk pipeline provided to provide the - // LSV Colossus Roots and GCS Buckets. - Pd *PersistentDiskData `json:"pd,omitempty"` - // ForceSendFields is a list of field names (e.g. "Pd") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Pd") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s *ServiceData) MarshalJSON() ([]byte, error) { - type NoMethod ServiceData - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // SetIamPolicyRequest: Request message for `SetIamPolicy` method. type SetIamPolicyRequest struct { // Policy: REQUIRED: The complete policy to be applied to the `resource`. The @@ -1517,6 +1500,34 @@ func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// TimeWindow: Represents an arbitrary window of time. +type TimeWindow struct { + // EndTime: Required. The end time of the time window provided in RFC 3339 + // (https://www.ietf.org/rfc/rfc3339.txt) format. The end time should take + // place after the start time. Example: "2024-01-02T12:04:06-06:00" + EndTime string `json:"endTime,omitempty"` + // StartTime: Required. The start time of the time window provided in RFC 3339 + // (https://www.ietf.org/rfc/rfc3339.txt) format. Example: + // "2024-01-01T12:04:06-04:00" + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *TimeWindow) MarshalJSON() ([]byte, error) { + type NoMethod TimeWindow + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // UpgradeInstanceRequest: Request message for upgrading a Data Fusion // instance. To change the instance properties, instance update should be used. type UpgradeInstanceRequest struct { @@ -1693,14 +1704,6 @@ func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsList return c } -// IncludeUnrevealedLocations sets the optional parameter -// "includeUnrevealedLocations": If true, the returned list will include -// locations which are not yet revealed. -func (c *ProjectsLocationsListCall) IncludeUnrevealedLocations(includeUnrevealedLocations bool) *ProjectsLocationsListCall { - c.urlParams_.Set("includeUnrevealedLocations", fmt.Sprint(includeUnrevealedLocations)) - return c -} - // PageSize sets the optional parameter "pageSize": The maximum number of // results to return. If not set, the service selects a default. func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { diff --git a/firestore/v1/firestore-api.json b/firestore/v1/firestore-api.json index 545c12a0bf..b194616c18 100644 --- a/firestore/v1/firestore-api.json +++ b/firestore/v1/firestore-api.json @@ -112,6 +112,35 @@ "resources": { "databases": { "methods": { + "bulkDeleteDocuments": { + "description": "Bulk deletes a subset of documents from Google Cloud Firestore. Documents created or updated after the underlying system starts to process the request will not be deleted. The bulk delete occurs in the background and its progress can be monitored and managed via the Operation resource that is created. For more details on bulk delete behavior, refer to: https://cloud.google.com/firestore/docs/manage-data/bulk-delete", + "flatPath": "v1/projects/{projectsId}/databases/{databasesId}:bulkDeleteDocuments", + "httpMethod": "POST", + "id": "firestore.projects.databases.bulkDeleteDocuments", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Database to operate. Should be of the form: `projects/{project_id}/databases/{database_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/databases/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:bulkDeleteDocuments", + "request": { + "$ref": "GoogleFirestoreAdminV1BulkDeleteDocumentsRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ] + }, "create": { "description": "Create a database.", "flatPath": "v1/projects/{projectsId}/databases", @@ -1677,7 +1706,7 @@ } } }, - "revision": "20240610", + "revision": "20240617", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "Aggregation": { @@ -2487,6 +2516,95 @@ }, "type": "object" }, + "GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata": { + "description": "Metadata for google.longrunning.Operation results from FirestoreAdmin.BulkDeleteDocuments.", + "id": "GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata", + "properties": { + "collectionIds": { + "description": "The ids of the collection groups that are being deleted.", + "items": { + "type": "string" + }, + "type": "array" + }, + "endTime": { + "description": "The time this operation completed. Will be unset if operation still in progress.", + "format": "google-datetime", + "type": "string" + }, + "namespaceIds": { + "description": "Which namespace ids are being deleted.", + "items": { + "type": "string" + }, + "type": "array" + }, + "operationState": { + "description": "The state of the operation.", + "enum": [ + "OPERATION_STATE_UNSPECIFIED", + "INITIALIZING", + "PROCESSING", + "CANCELLING", + "FINALIZING", + "SUCCESSFUL", + "FAILED", + "CANCELLED" + ], + "enumDescriptions": [ + "Unspecified.", + "Request is being prepared for processing.", + "Request is actively being processed.", + "Request is in the process of being cancelled after user called google.longrunning.Operations.CancelOperation on the operation.", + "Request has been processed and is in its finalization stage.", + "Request has completed successfully.", + "Request has finished being processed, but encountered an error.", + "Request has finished being cancelled after user called google.longrunning.Operations.CancelOperation." + ], + "type": "string" + }, + "progressBytes": { + "$ref": "GoogleFirestoreAdminV1Progress", + "description": "The progress, in bytes, of this operation." + }, + "progressDocuments": { + "$ref": "GoogleFirestoreAdminV1Progress", + "description": "The progress, in documents, of this operation." + }, + "snapshotTime": { + "description": "The timestamp that corresponds to the version of the database that is being read to get the list of documents to delete. This time can also be used as the timestamp of PITR in case of disaster recovery (subject to PITR window limit).", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "The time this operation started.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleFirestoreAdminV1BulkDeleteDocumentsRequest": { + "description": "The request for FirestoreAdmin.BulkDeleteDocuments. When both collection_ids and namespace_ids are set, only documents satisfying both conditions will be deleted. Requests with namespace_ids and collection_ids both empty will be rejected. Please use FirestoreAdmin.DeleteDatabase instead.", + "id": "GoogleFirestoreAdminV1BulkDeleteDocumentsRequest", + "properties": { + "collectionIds": { + "description": "Optional. IDs of the collection groups to delete. Unspecified means all collection groups. Each collection group in this list must be unique.", + "items": { + "type": "string" + }, + "type": "array" + }, + "namespaceIds": { + "description": "Optional. Namespaces to delete. An empty list means all namespaces. This is the recommended usage for databases that don't use namespaces. An empty string element represents the default namespace. This should be used if the database has data in non-default namespaces, but doesn't want to delete from them. Each namespace in this list must be unique.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleFirestoreAdminV1CmekConfig": { "description": "The CMEK (Customer Managed Encryption Key) configuration for a Firestore database. If not present, the database is secured by the default Google encryption key.", "id": "GoogleFirestoreAdminV1CmekConfig", @@ -2637,7 +2755,7 @@ "DATASTORE_MODE" ], "enumDescriptions": [ - "The default value. This value is used if the database type is omitted.", + "Not used.", "Firestore Native Mode", "Firestore in Datastore Mode." ], @@ -2663,22 +2781,6 @@ }, "type": "object" }, - "GoogleFirestoreAdminV1DatabaseSnapshot": { - "description": "A consistent snapshot of a database at a specific point in time.", - "id": "GoogleFirestoreAdminV1DatabaseSnapshot", - "properties": { - "database": { - "description": "Required. A name of the form `projects/{project_id}/databases/{database_id}`", - "type": "string" - }, - "snapshotTime": { - "description": "Required. The timestamp at which the database snapshot is taken. The requested timestamp must be a whole minute within the PITR window.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, "GoogleFirestoreAdminV1DeleteDatabaseMetadata": { "description": "Metadata related to the delete database operation.", "id": "GoogleFirestoreAdminV1DeleteDatabaseMetadata", @@ -3366,10 +3468,6 @@ "description": "Required. The ID to use for the database, which will become the final component of the database's resource name. This database id must not be associated with an existing database. This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. \"(default)\" database id is also valid.", "type": "string" }, - "databaseSnapshot": { - "$ref": "GoogleFirestoreAdminV1DatabaseSnapshot", - "description": "Database snapshot to restore from. The source database must exist and have enabled PITR. The restored database will be created in the same location as the source database." - }, "kmsKeyName": { "description": "Use Customer Managed Encryption Keys (CMEK) for encryption. Only keys in the same location as this database are allowed to be used for encryption. For Firestore's nam5 multi-region, this corresponds to Cloud KMS multi-region us. For Firestore's eur3 multi-region, this corresponds to Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations. The expected format is `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.", "type": "string" diff --git a/firestore/v1/firestore-gen.go b/firestore/v1/firestore-gen.go index b259a3a1a8..64883a8736 100644 --- a/firestore/v1/firestore-gen.go +++ b/firestore/v1/firestore-gen.go @@ -1497,6 +1497,96 @@ func (s *GoogleFirestoreAdminV1BackupSchedule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata: Metadata for +// google.longrunning.Operation results from +// FirestoreAdmin.BulkDeleteDocuments. +type GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata struct { + // CollectionIds: The ids of the collection groups that are being deleted. + CollectionIds []string `json:"collectionIds,omitempty"` + // EndTime: The time this operation completed. Will be unset if operation still + // in progress. + EndTime string `json:"endTime,omitempty"` + // NamespaceIds: Which namespace ids are being deleted. + NamespaceIds []string `json:"namespaceIds,omitempty"` + // OperationState: The state of the operation. + // + // Possible values: + // "OPERATION_STATE_UNSPECIFIED" - Unspecified. + // "INITIALIZING" - Request is being prepared for processing. + // "PROCESSING" - Request is actively being processed. + // "CANCELLING" - Request is in the process of being cancelled after user + // called google.longrunning.Operations.CancelOperation on the operation. + // "FINALIZING" - Request has been processed and is in its finalization + // stage. + // "SUCCESSFUL" - Request has completed successfully. + // "FAILED" - Request has finished being processed, but encountered an error. + // "CANCELLED" - Request has finished being cancelled after user called + // google.longrunning.Operations.CancelOperation. + OperationState string `json:"operationState,omitempty"` + // ProgressBytes: The progress, in bytes, of this operation. + ProgressBytes *GoogleFirestoreAdminV1Progress `json:"progressBytes,omitempty"` + // ProgressDocuments: The progress, in documents, of this operation. + ProgressDocuments *GoogleFirestoreAdminV1Progress `json:"progressDocuments,omitempty"` + // SnapshotTime: The timestamp that corresponds to the version of the database + // that is being read to get the list of documents to delete. This time can + // also be used as the timestamp of PITR in case of disaster recovery (subject + // to PITR window limit). + SnapshotTime string `json:"snapshotTime,omitempty"` + // StartTime: The time this operation started. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "CollectionIds") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CollectionIds") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleFirestoreAdminV1BulkDeleteDocumentsRequest: The request for +// FirestoreAdmin.BulkDeleteDocuments. When both collection_ids and +// namespace_ids are set, only documents satisfying both conditions will be +// deleted. Requests with namespace_ids and collection_ids both empty will be +// rejected. Please use FirestoreAdmin.DeleteDatabase instead. +type GoogleFirestoreAdminV1BulkDeleteDocumentsRequest struct { + // CollectionIds: Optional. IDs of the collection groups to delete. Unspecified + // means all collection groups. Each collection group in this list must be + // unique. + CollectionIds []string `json:"collectionIds,omitempty"` + // NamespaceIds: Optional. Namespaces to delete. An empty list means all + // namespaces. This is the recommended usage for databases that don't use + // namespaces. An empty string element represents the default namespace. This + // should be used if the database has data in non-default namespaces, but + // doesn't want to delete from them. Each namespace in this list must be + // unique. + NamespaceIds []string `json:"namespaceIds,omitempty"` + // ForceSendFields is a list of field names (e.g. "CollectionIds") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CollectionIds") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleFirestoreAdminV1BulkDeleteDocumentsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleFirestoreAdminV1BulkDeleteDocumentsRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleFirestoreAdminV1CmekConfig: The CMEK (Customer Managed Encryption Key) // configuration for a Firestore database. If not present, the database is // secured by the default Google encryption key. @@ -1654,8 +1744,7 @@ type GoogleFirestoreAdminV1Database struct { // information about how to choose. // // Possible values: - // "DATABASE_TYPE_UNSPECIFIED" - The default value. This value is used if the - // database type is omitted. + // "DATABASE_TYPE_UNSPECIFIED" - Not used. // "FIRESTORE_NATIVE" - Firestore Native Mode // "DATASTORE_MODE" - Firestore in Datastore Mode. Type string `json:"type,omitempty"` @@ -1692,34 +1781,6 @@ func (s *GoogleFirestoreAdminV1Database) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleFirestoreAdminV1DatabaseSnapshot: A consistent snapshot of a database -// at a specific point in time. -type GoogleFirestoreAdminV1DatabaseSnapshot struct { - // Database: Required. A name of the form - // `projects/{project_id}/databases/{database_id}` - Database string `json:"database,omitempty"` - // SnapshotTime: Required. The timestamp at which the database snapshot is - // taken. The requested timestamp must be a whole minute within the PITR - // window. - SnapshotTime string `json:"snapshotTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Database") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Database") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s *GoogleFirestoreAdminV1DatabaseSnapshot) MarshalJSON() ([]byte, error) { - type NoMethod GoogleFirestoreAdminV1DatabaseSnapshot - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // GoogleFirestoreAdminV1DeleteDatabaseMetadata: Metadata related to the delete // database operation. type GoogleFirestoreAdminV1DeleteDatabaseMetadata struct { @@ -2537,10 +2598,6 @@ type GoogleFirestoreAdminV1RestoreDatabaseRequest struct { // /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. "(default)" database id is also // valid. DatabaseId string `json:"databaseId,omitempty"` - // DatabaseSnapshot: Database snapshot to restore from. The source database - // must exist and have enabled PITR. The restored database will be created in - // the same location as the source database. - DatabaseSnapshot *GoogleFirestoreAdminV1DatabaseSnapshot `json:"databaseSnapshot,omitempty"` // KmsKeyName: Use Customer Managed Encryption Keys (CMEK) for encryption. Only // keys in the same location as this database are allowed to be used for // encryption. For Firestore's nam5 multi-region, this corresponds to Cloud KMS @@ -4144,6 +4201,114 @@ func (s *WriteResult) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +type ProjectsDatabasesBulkDeleteDocumentsCall struct { + s *Service + name string + googlefirestoreadminv1bulkdeletedocumentsrequest *GoogleFirestoreAdminV1BulkDeleteDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BulkDeleteDocuments: Bulk deletes a subset of documents from Google Cloud +// Firestore. Documents created or updated after the underlying system starts +// to process the request will not be deleted. The bulk delete occurs in the +// background and its progress can be monitored and managed via the Operation +// resource that is created. For more details on bulk delete behavior, refer +// to: https://cloud.google.com/firestore/docs/manage-data/bulk-delete +// +// - name: Database to operate. Should be of the form: +// `projects/{project_id}/databases/{database_id}`. +func (r *ProjectsDatabasesService) BulkDeleteDocuments(name string, googlefirestoreadminv1bulkdeletedocumentsrequest *GoogleFirestoreAdminV1BulkDeleteDocumentsRequest) *ProjectsDatabasesBulkDeleteDocumentsCall { + c := &ProjectsDatabasesBulkDeleteDocumentsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlefirestoreadminv1bulkdeletedocumentsrequest = googlefirestoreadminv1bulkdeletedocumentsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsDatabasesBulkDeleteDocumentsCall) Fields(s ...googleapi.Field) *ProjectsDatabasesBulkDeleteDocumentsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsDatabasesBulkDeleteDocumentsCall) Context(ctx context.Context) *ProjectsDatabasesBulkDeleteDocumentsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsDatabasesBulkDeleteDocumentsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsDatabasesBulkDeleteDocumentsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlefirestoreadminv1bulkdeletedocumentsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:bulkDeleteDocuments") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "firestore.projects.databases.bulkDeleteDocuments" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.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 *ProjectsDatabasesBulkDeleteDocumentsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 := &GoogleLongrunningOperation{ + 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 +} + type ProjectsDatabasesCreateCall struct { s *Service parent string diff --git a/firestore/v1beta1/firestore-api.json b/firestore/v1beta1/firestore-api.json index ddea9f3a0c..b7938f7cb6 100644 --- a/firestore/v1beta1/firestore-api.json +++ b/firestore/v1beta1/firestore-api.json @@ -950,7 +950,7 @@ } } }, - "revision": "20240420", + "revision": "20240617", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "Aggregation": { @@ -1667,6 +1667,74 @@ }, "type": "object" }, + "GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata": { + "description": "Metadata for google.longrunning.Operation results from FirestoreAdmin.BulkDeleteDocuments.", + "id": "GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata", + "properties": { + "collectionIds": { + "description": "The ids of the collection groups that are being deleted.", + "items": { + "type": "string" + }, + "type": "array" + }, + "endTime": { + "description": "The time this operation completed. Will be unset if operation still in progress.", + "format": "google-datetime", + "type": "string" + }, + "namespaceIds": { + "description": "Which namespace ids are being deleted.", + "items": { + "type": "string" + }, + "type": "array" + }, + "operationState": { + "description": "The state of the operation.", + "enum": [ + "OPERATION_STATE_UNSPECIFIED", + "INITIALIZING", + "PROCESSING", + "CANCELLING", + "FINALIZING", + "SUCCESSFUL", + "FAILED", + "CANCELLED" + ], + "enumDescriptions": [ + "Unspecified.", + "Request is being prepared for processing.", + "Request is actively being processed.", + "Request is in the process of being cancelled after user called google.longrunning.Operations.CancelOperation on the operation.", + "Request has been processed and is in its finalization stage.", + "Request has completed successfully.", + "Request has finished being processed, but encountered an error.", + "Request has finished being cancelled after user called google.longrunning.Operations.CancelOperation." + ], + "type": "string" + }, + "progressBytes": { + "$ref": "GoogleFirestoreAdminV1Progress", + "description": "The progress, in bytes, of this operation." + }, + "progressDocuments": { + "$ref": "GoogleFirestoreAdminV1Progress", + "description": "The progress, in documents, of this operation." + }, + "snapshotTime": { + "description": "The timestamp that corresponds to the version of the database that is being read to get the list of documents to delete. This time can also be used as the timestamp of PITR in case of disaster recovery (subject to PITR window limit).", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "The time this operation started.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleFirestoreAdminV1CreateDatabaseMetadata": { "description": "Metadata related to the create database operation.", "id": "GoogleFirestoreAdminV1CreateDatabaseMetadata", diff --git a/firestore/v1beta1/firestore-gen.go b/firestore/v1beta1/firestore-gen.go index 48965cf59e..2f5f5ab8f0 100644 --- a/firestore/v1beta1/firestore-gen.go +++ b/firestore/v1beta1/firestore-gen.go @@ -1328,6 +1328,61 @@ func (s *FindNearest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata: Metadata for +// google.longrunning.Operation results from +// FirestoreAdmin.BulkDeleteDocuments. +type GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata struct { + // CollectionIds: The ids of the collection groups that are being deleted. + CollectionIds []string `json:"collectionIds,omitempty"` + // EndTime: The time this operation completed. Will be unset if operation still + // in progress. + EndTime string `json:"endTime,omitempty"` + // NamespaceIds: Which namespace ids are being deleted. + NamespaceIds []string `json:"namespaceIds,omitempty"` + // OperationState: The state of the operation. + // + // Possible values: + // "OPERATION_STATE_UNSPECIFIED" - Unspecified. + // "INITIALIZING" - Request is being prepared for processing. + // "PROCESSING" - Request is actively being processed. + // "CANCELLING" - Request is in the process of being cancelled after user + // called google.longrunning.Operations.CancelOperation on the operation. + // "FINALIZING" - Request has been processed and is in its finalization + // stage. + // "SUCCESSFUL" - Request has completed successfully. + // "FAILED" - Request has finished being processed, but encountered an error. + // "CANCELLED" - Request has finished being cancelled after user called + // google.longrunning.Operations.CancelOperation. + OperationState string `json:"operationState,omitempty"` + // ProgressBytes: The progress, in bytes, of this operation. + ProgressBytes *GoogleFirestoreAdminV1Progress `json:"progressBytes,omitempty"` + // ProgressDocuments: The progress, in documents, of this operation. + ProgressDocuments *GoogleFirestoreAdminV1Progress `json:"progressDocuments,omitempty"` + // SnapshotTime: The timestamp that corresponds to the version of the database + // that is being read to get the list of documents to delete. This time can + // also be used as the timestamp of PITR in case of disaster recovery (subject + // to PITR window limit). + SnapshotTime string `json:"snapshotTime,omitempty"` + // StartTime: The time this operation started. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "CollectionIds") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CollectionIds") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleFirestoreAdminV1CreateDatabaseMetadata: Metadata related to the create // database operation. type GoogleFirestoreAdminV1CreateDatabaseMetadata struct { diff --git a/firestore/v1beta2/firestore-api.json b/firestore/v1beta2/firestore-api.json index ce69a03fb7..b92a5b3e9a 100644 --- a/firestore/v1beta2/firestore-api.json +++ b/firestore/v1beta2/firestore-api.json @@ -415,7 +415,7 @@ } } }, - "revision": "20230905", + "revision": "20240617", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "Empty": { @@ -424,6 +424,74 @@ "properties": {}, "type": "object" }, + "GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata": { + "description": "Metadata for google.longrunning.Operation results from FirestoreAdmin.BulkDeleteDocuments.", + "id": "GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata", + "properties": { + "collectionIds": { + "description": "The ids of the collection groups that are being deleted.", + "items": { + "type": "string" + }, + "type": "array" + }, + "endTime": { + "description": "The time this operation completed. Will be unset if operation still in progress.", + "format": "google-datetime", + "type": "string" + }, + "namespaceIds": { + "description": "Which namespace ids are being deleted.", + "items": { + "type": "string" + }, + "type": "array" + }, + "operationState": { + "description": "The state of the operation.", + "enum": [ + "OPERATION_STATE_UNSPECIFIED", + "INITIALIZING", + "PROCESSING", + "CANCELLING", + "FINALIZING", + "SUCCESSFUL", + "FAILED", + "CANCELLED" + ], + "enumDescriptions": [ + "Unspecified.", + "Request is being prepared for processing.", + "Request is actively being processed.", + "Request is in the process of being cancelled after user called google.longrunning.Operations.CancelOperation on the operation.", + "Request has been processed and is in its finalization stage.", + "Request has completed successfully.", + "Request has finished being processed, but encountered an error.", + "Request has finished being cancelled after user called google.longrunning.Operations.CancelOperation." + ], + "type": "string" + }, + "progressBytes": { + "$ref": "GoogleFirestoreAdminV1Progress", + "description": "The progress, in bytes, of this operation." + }, + "progressDocuments": { + "$ref": "GoogleFirestoreAdminV1Progress", + "description": "The progress, in documents, of this operation." + }, + "snapshotTime": { + "description": "The timestamp that corresponds to the version of the database that is being read to get the list of documents to delete. This time can also be used as the timestamp of PITR in case of disaster recovery (subject to PITR window limit).", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "The time this operation started.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleFirestoreAdminV1CreateDatabaseMetadata": { "description": "Metadata related to the create database operation.", "id": "GoogleFirestoreAdminV1CreateDatabaseMetadata", diff --git a/firestore/v1beta2/firestore-gen.go b/firestore/v1beta2/firestore-gen.go index 76b060e7aa..957300f49a 100644 --- a/firestore/v1beta2/firestore-gen.go +++ b/firestore/v1beta2/firestore-gen.go @@ -231,6 +231,61 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata: Metadata for +// google.longrunning.Operation results from +// FirestoreAdmin.BulkDeleteDocuments. +type GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata struct { + // CollectionIds: The ids of the collection groups that are being deleted. + CollectionIds []string `json:"collectionIds,omitempty"` + // EndTime: The time this operation completed. Will be unset if operation still + // in progress. + EndTime string `json:"endTime,omitempty"` + // NamespaceIds: Which namespace ids are being deleted. + NamespaceIds []string `json:"namespaceIds,omitempty"` + // OperationState: The state of the operation. + // + // Possible values: + // "OPERATION_STATE_UNSPECIFIED" - Unspecified. + // "INITIALIZING" - Request is being prepared for processing. + // "PROCESSING" - Request is actively being processed. + // "CANCELLING" - Request is in the process of being cancelled after user + // called google.longrunning.Operations.CancelOperation on the operation. + // "FINALIZING" - Request has been processed and is in its finalization + // stage. + // "SUCCESSFUL" - Request has completed successfully. + // "FAILED" - Request has finished being processed, but encountered an error. + // "CANCELLED" - Request has finished being cancelled after user called + // google.longrunning.Operations.CancelOperation. + OperationState string `json:"operationState,omitempty"` + // ProgressBytes: The progress, in bytes, of this operation. + ProgressBytes *GoogleFirestoreAdminV1Progress `json:"progressBytes,omitempty"` + // ProgressDocuments: The progress, in documents, of this operation. + ProgressDocuments *GoogleFirestoreAdminV1Progress `json:"progressDocuments,omitempty"` + // SnapshotTime: The timestamp that corresponds to the version of the database + // that is being read to get the list of documents to delete. This time can + // also be used as the timestamp of PITR in case of disaster recovery (subject + // to PITR window limit). + SnapshotTime string `json:"snapshotTime,omitempty"` + // StartTime: The time this operation started. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "CollectionIds") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CollectionIds") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleFirestoreAdminV1CreateDatabaseMetadata: Metadata related to the create // database operation. type GoogleFirestoreAdminV1CreateDatabaseMetadata struct { diff --git a/storage/v1/storage-api.json b/storage/v1/storage-api.json index 160800c2bb..d336c44ccc 100644 --- a/storage/v1/storage-api.json +++ b/storage/v1/storage-api.json @@ -33,7 +33,7 @@ "location": "me-central2" } ], - "etag": "\"3132383134303835313436343635393933303731\"", + "etag": "\"39393431363637393939313737343036323439\"", "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" @@ -4075,7 +4075,7 @@ } } }, - "revision": "20240524", + "revision": "20240621", "rootUrl": "https://storage.googleapis.com/", "schemas": { "AnywhereCache": { @@ -5007,6 +5007,11 @@ "description": "The response message for storage.buckets.operations.list.", "id": "GoogleLongrunningListOperationsResponse", "properties": { + "kind": { + "default": "storage#operations", + "description": "The kind of item this is. For lists of operations, this is always storage#operations.", + "type": "string" + }, "nextPageToken": { "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", "type": "string" @@ -5033,6 +5038,11 @@ "$ref": "GoogleRpcStatus", "description": "The error result of the operation in case of failure or cancellation." }, + "kind": { + "default": "storage#operation", + "description": "The kind of item this is. For operations, this is always storage#operation.", + "type": "string" + }, "metadata": { "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", @@ -5052,6 +5062,10 @@ }, "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as \"Delete\", the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type \"XxxResponse\", where \"Xxx\" is the original method name. For example, if the original method name is \"TakeSnapshot()\", the inferred response type is \"TakeSnapshotResponse\".", "type": "object" + }, + "selfLink": { + "description": "The link to this long running operation.", + "type": "string" } }, "type": "object" diff --git a/storage/v1/storage-gen.go b/storage/v1/storage-gen.go index b4d425e59f..896bcb9c34 100644 --- a/storage/v1/storage-gen.go +++ b/storage/v1/storage-gen.go @@ -1682,6 +1682,9 @@ func (s *Folders) MarshalJSON() ([]byte, error) { // GoogleLongrunningListOperationsResponse: The response message for // storage.buckets.operations.list. type GoogleLongrunningListOperationsResponse struct { + // Kind: The kind of item this is. For lists of operations, this is always + // storage#operations. + Kind string `json:"kind,omitempty"` // NextPageToken: The continuation token, used to page through large result // sets. Provide this value in a subsequent request to return the next page of // results. @@ -1692,15 +1695,15 @@ type GoogleLongrunningListOperationsResponse struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "Kind") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -1719,6 +1722,9 @@ type GoogleLongrunningOperation struct { Done bool `json:"done,omitempty"` // Error: The error result of the operation in case of failure or cancellation. Error *GoogleRpcStatus `json:"error,omitempty"` + // Kind: The kind of item this is. For operations, this is always + // storage#operation. + Kind string `json:"kind,omitempty"` // Metadata: Service-specific metadata associated with the operation. It // typically contains progress information and common metadata such as create // time. Some services might not provide such metadata. Any method that returns @@ -1736,6 +1742,8 @@ type GoogleLongrunningOperation struct { // method name. For example, if the original method name is "TakeSnapshot()", // the inferred response type is "TakeSnapshotResponse". Response googleapi.RawMessage `json:"response,omitempty"` + // SelfLink: The link to this long running operation. + SelfLink string `json:"selfLink,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"`