From 0846d9297408b2a37932a3b907bd57df5e7da79a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 23 Jul 2023 00:22:12 -0700 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2082) --- bigtableadmin/v2/bigtableadmin-api.json | 106 +--- bigtableadmin/v2/bigtableadmin-gen.go | 465 +----------------- calendar/v3/calendar-api.json | 6 +- calendar/v3/calendar-gen.go | 20 +- gkeonprem/v1/gkeonprem-api.json | 68 ++- gkeonprem/v1/gkeonprem-gen.go | 112 ++++- .../v1/serviceconsumermanagement-api.json | 46 +- .../v1/serviceconsumermanagement-gen.go | 92 ++++ .../serviceconsumermanagement-api.json | 46 +- .../v1beta1/serviceconsumermanagement-gen.go | 92 ++++ serviceusage/v1/serviceusage-api.json | 46 +- serviceusage/v1/serviceusage-gen.go | 92 ++++ serviceusage/v1beta1/serviceusage-api.json | 46 +- serviceusage/v1beta1/serviceusage-gen.go | 92 ++++ tpu/v2alpha1/tpu-api.json | 17 +- tpu/v2alpha1/tpu-gen.go | 11 + 16 files changed, 762 insertions(+), 595 deletions(-) diff --git a/bigtableadmin/v2/bigtableadmin-api.json b/bigtableadmin/v2/bigtableadmin-api.json index e470c0d4f97..4a78b01530c 100644 --- a/bigtableadmin/v2/bigtableadmin-api.json +++ b/bigtableadmin/v2/bigtableadmin-api.json @@ -1877,108 +1877,6 @@ "https://www.googleapis.com/auth/cloud-platform" ] } - }, - "resources": { - "views": { - "methods": { - "getIamPolicy": { - "description": "Gets the access control policy for a Table resource. Returns an empty policy if the resource exists but does not have a policy set.", - "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/tables/{tablesId}/views/{viewsId}:getIamPolicy", - "httpMethod": "POST", - "id": "bigtableadmin.projects.instances.tables.views.getIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/instances/[^/]+/tables/[^/]+/views/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2/{+resource}:getIamPolicy", - "request": { - "$ref": "GetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/bigtable.admin", - "https://www.googleapis.com/auth/bigtable.admin.table", - "https://www.googleapis.com/auth/cloud-bigtable.admin", - "https://www.googleapis.com/auth/cloud-bigtable.admin.table", - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on a Table resource. Replaces any existing policy.", - "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/tables/{tablesId}/views/{viewsId}:setIamPolicy", - "httpMethod": "POST", - "id": "bigtableadmin.projects.instances.tables.views.setIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/instances/[^/]+/tables/[^/]+/views/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2/{+resource}:setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/bigtable.admin", - "https://www.googleapis.com/auth/bigtable.admin.table", - "https://www.googleapis.com/auth/cloud-bigtable.admin", - "https://www.googleapis.com/auth/cloud-bigtable.admin.table", - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that the caller has on the specified table resource.", - "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/tables/{tablesId}/views/{viewsId}:testIamPermissions", - "httpMethod": "POST", - "id": "bigtableadmin.projects.instances.tables.views.testIamPermissions", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/instances/[^/]+/tables/[^/]+/views/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v2/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/bigtable.admin", - "https://www.googleapis.com/auth/bigtable.admin.table", - "https://www.googleapis.com/auth/cloud-bigtable.admin", - "https://www.googleapis.com/auth/cloud-bigtable.admin.table", - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } } } } @@ -2068,7 +1966,7 @@ } } }, - "revision": "20230622", + "revision": "20230713", "rootUrl": "https://bigtableadmin.googleapis.com/", "schemas": { "AppProfile": { @@ -2196,7 +2094,7 @@ "type": "string" }, "expireTime": { - "description": "Required. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 30 days from the time the request is received. Once the `expire_time` has passed, Cloud Bigtable will delete the backup and free the resources used by the backup.", + "description": "Required. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 90 days from the time the request is received. Once the `expire_time` has passed, Cloud Bigtable will delete the backup and free the resources used by the backup.", "format": "google-datetime", "type": "string" }, diff --git a/bigtableadmin/v2/bigtableadmin-gen.go b/bigtableadmin/v2/bigtableadmin-gen.go index 06c9bb2f3fe..3f5c0fbe823 100644 --- a/bigtableadmin/v2/bigtableadmin-gen.go +++ b/bigtableadmin/v2/bigtableadmin-gen.go @@ -288,23 +288,11 @@ type ProjectsInstancesClustersHotTabletsService struct { func NewProjectsInstancesTablesService(s *Service) *ProjectsInstancesTablesService { rs := &ProjectsInstancesTablesService{s: s} - rs.Views = NewProjectsInstancesTablesViewsService(s) return rs } type ProjectsInstancesTablesService struct { s *Service - - Views *ProjectsInstancesTablesViewsService -} - -func NewProjectsInstancesTablesViewsService(s *Service) *ProjectsInstancesTablesViewsService { - rs := &ProjectsInstancesTablesViewsService{s: s} - return rs -} - -type ProjectsInstancesTablesViewsService struct { - s *Service } func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { @@ -553,7 +541,7 @@ type Backup struct { EndTime string `json:"endTime,omitempty"` // ExpireTime: Required. The expiration time of the backup, with - // microseconds granularity that must be at least 6 hours and at most 30 + // microseconds granularity that must be at least 6 hours and at most 90 // days from the time the request is received. Once the `expire_time` // has passed, Cloud Bigtable will delete the backup and free the // resources used by the backup. @@ -11481,457 +11469,6 @@ func (c *ProjectsInstancesTablesUndeleteCall) Do(opts ...googleapi.CallOption) ( } -// method id "bigtableadmin.projects.instances.tables.views.getIamPolicy": - -type ProjectsInstancesTablesViewsGetIamPolicyCall struct { - s *Service - resource string - getiampolicyrequest *GetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a Table resource. -// Returns an empty policy if the resource exists but does not have a -// policy set. -// -// - resource: REQUIRED: The resource for which the policy is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsInstancesTablesViewsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsInstancesTablesViewsGetIamPolicyCall { - c := &ProjectsInstancesTablesViewsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.getiampolicyrequest = getiampolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsInstancesTablesViewsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesViewsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsInstancesTablesViewsGetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesTablesViewsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsInstancesTablesViewsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsInstancesTablesViewsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy") - 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{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "bigtableadmin.projects.instances.tables.views.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.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 *ProjectsInstancesTablesViewsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the access control policy for a Table resource. Returns an empty policy if the resource exists but does not have a policy set.", - // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/tables/{tablesId}/views/{viewsId}:getIamPolicy", - // "httpMethod": "POST", - // "id": "bigtableadmin.projects.instances.tables.views.getIamPolicy", - // "parameterOrder": [ - // "resource" - // ], - // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - // "location": "path", - // "pattern": "^projects/[^/]+/instances/[^/]+/tables/[^/]+/views/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2/{+resource}:getIamPolicy", - // "request": { - // "$ref": "GetIamPolicyRequest" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/bigtable.admin", - // "https://www.googleapis.com/auth/bigtable.admin.table", - // "https://www.googleapis.com/auth/cloud-bigtable.admin", - // "https://www.googleapis.com/auth/cloud-bigtable.admin.table", - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "bigtableadmin.projects.instances.tables.views.setIamPolicy": - -type ProjectsInstancesTablesViewsSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on a Table resource. -// Replaces any existing policy. -// -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsInstancesTablesViewsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsInstancesTablesViewsSetIamPolicyCall { - c := &ProjectsInstancesTablesViewsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsInstancesTablesViewsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesViewsSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsInstancesTablesViewsSetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesTablesViewsSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsInstancesTablesViewsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsInstancesTablesViewsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:setIamPolicy") - 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{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "bigtableadmin.projects.instances.tables.views.setIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.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 *ProjectsInstancesTablesViewsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the access control policy on a Table resource. Replaces any existing policy.", - // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/tables/{tablesId}/views/{viewsId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "bigtableadmin.projects.instances.tables.views.setIamPolicy", - // "parameterOrder": [ - // "resource" - // ], - // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - // "location": "path", - // "pattern": "^projects/[^/]+/instances/[^/]+/tables/[^/]+/views/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2/{+resource}:setIamPolicy", - // "request": { - // "$ref": "SetIamPolicyRequest" - // }, - // "response": { - // "$ref": "Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/bigtable.admin", - // "https://www.googleapis.com/auth/bigtable.admin.table", - // "https://www.googleapis.com/auth/cloud-bigtable.admin", - // "https://www.googleapis.com/auth/cloud-bigtable.admin.table", - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "bigtableadmin.projects.instances.tables.views.testIamPermissions": - -type ProjectsInstancesTablesViewsTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that the caller has on the -// specified table resource. -// -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsInstancesTablesViewsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsInstancesTablesViewsTestIamPermissionsCall { - c := &ProjectsInstancesTablesViewsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsInstancesTablesViewsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesViewsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsInstancesTablesViewsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsInstancesTablesViewsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsInstancesTablesViewsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsInstancesTablesViewsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:testIamPermissions") - 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{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "bigtableadmin.projects.instances.tables.views.testIamPermissions" call. -// Exactly one of *TestIamPermissionsResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *TestIamPermissionsResponse.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 *ProjectsInstancesTablesViewsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, 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 := &TestIamPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that the caller has on the specified table resource.", - // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/tables/{tablesId}/views/{viewsId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "bigtableadmin.projects.instances.tables.views.testIamPermissions", - // "parameterOrder": [ - // "resource" - // ], - // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - // "location": "path", - // "pattern": "^projects/[^/]+/instances/[^/]+/tables/[^/]+/views/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2/{+resource}:testIamPermissions", - // "request": { - // "$ref": "TestIamPermissionsRequest" - // }, - // "response": { - // "$ref": "TestIamPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/bigtable.admin", - // "https://www.googleapis.com/auth/bigtable.admin.table", - // "https://www.googleapis.com/auth/cloud-bigtable.admin", - // "https://www.googleapis.com/auth/cloud-bigtable.admin.table", - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - // method id "bigtableadmin.projects.locations.get": type ProjectsLocationsGetCall struct { diff --git a/calendar/v3/calendar-api.json b/calendar/v3/calendar-api.json index 0c084378a4b..f9e3a33a230 100644 --- a/calendar/v3/calendar-api.json +++ b/calendar/v3/calendar-api.json @@ -1164,7 +1164,7 @@ "type": "boolean" }, "syncToken": { - "description": "Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. All events deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False.\nThere are several query parameters that cannot be specified together with nextSyncToken to ensure consistency of the client state.\n\nThese are: \n- iCalUID \n- orderBy \n- privateExtendedProperty \n- q \n- sharedExtendedProperty \n- timeMin \n- timeMax \n- updatedMin If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken.\nLearn more about incremental synchronization.\nOptional. The default is to return all entries.", + "description": "Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. All events deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False.\nThere are several query parameters that cannot be specified together with nextSyncToken to ensure consistency of the client state.\n\nThese are: \n- iCalUID \n- orderBy \n- privateExtendedProperty \n- q \n- sharedExtendedProperty \n- timeMin \n- timeMax \n- updatedMin All other query parameters should be the same as for the initial synchronization to avoid undefined behavior. If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken.\nLearn more about incremental synchronization.\nOptional. The default is to return all entries.", "location": "query", "type": "string" }, @@ -1567,7 +1567,7 @@ "type": "boolean" }, "syncToken": { - "description": "Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. All events deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False.\nThere are several query parameters that cannot be specified together with nextSyncToken to ensure consistency of the client state.\n\nThese are: \n- iCalUID \n- orderBy \n- privateExtendedProperty \n- q \n- sharedExtendedProperty \n- timeMin \n- timeMax \n- updatedMin If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken.\nLearn more about incremental synchronization.\nOptional. The default is to return all entries.", + "description": "Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. All events deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False.\nThere are several query parameters that cannot be specified together with nextSyncToken to ensure consistency of the client state.\n\nThese are: \n- iCalUID \n- orderBy \n- privateExtendedProperty \n- q \n- sharedExtendedProperty \n- timeMin \n- timeMax \n- updatedMin All other query parameters should be the same as for the initial synchronization to avoid undefined behavior. If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken.\nLearn more about incremental synchronization.\nOptional. The default is to return all entries.", "location": "query", "type": "string" }, @@ -1735,7 +1735,7 @@ } } }, - "revision": "20230623", + "revision": "20230714", "rootUrl": "https://www.googleapis.com/", "schemas": { "Acl": { diff --git a/calendar/v3/calendar-gen.go b/calendar/v3/calendar-gen.go index 65d413c097a..b3bc355b648 100644 --- a/calendar/v3/calendar-gen.go +++ b/calendar/v3/calendar-gen.go @@ -7219,9 +7219,11 @@ func (c *EventsListCall) SingleEvents(singleEvents bool) *EventsListCall { // - sharedExtendedProperty // - timeMin // - timeMax -// - updatedMin If the syncToken expires, the server will respond with a -// 410 GONE response code and the client should clear its storage and -// perform a full synchronization without any syncToken. +// - updatedMin All other query parameters should be the same as for the +// initial synchronization to avoid undefined behavior. If the syncToken +// expires, the server will respond with a 410 GONE response code and +// the client should clear its storage and perform a full +// synchronization without any syncToken. // Learn more about incremental synchronization. // // The default is to return all entries. @@ -7463,7 +7465,7 @@ func (c *EventsListCall) Do(opts ...googleapi.CallOption) (*Events, error) { // "type": "boolean" // }, // "syncToken": { - // "description": "Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. All events deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False.\nThere are several query parameters that cannot be specified together with nextSyncToken to ensure consistency of the client state.\n\nThese are: \n- iCalUID \n- orderBy \n- privateExtendedProperty \n- q \n- sharedExtendedProperty \n- timeMin \n- timeMax \n- updatedMin If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken.\nLearn more about incremental synchronization.\nOptional. The default is to return all entries.", + // "description": "Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. All events deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False.\nThere are several query parameters that cannot be specified together with nextSyncToken to ensure consistency of the client state.\n\nThese are: \n- iCalUID \n- orderBy \n- privateExtendedProperty \n- q \n- sharedExtendedProperty \n- timeMin \n- timeMax \n- updatedMin All other query parameters should be the same as for the initial synchronization to avoid undefined behavior. If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken.\nLearn more about incremental synchronization.\nOptional. The default is to return all entries.", // "location": "query", // "type": "string" // }, @@ -8643,9 +8645,11 @@ func (c *EventsWatchCall) SingleEvents(singleEvents bool) *EventsWatchCall { // - sharedExtendedProperty // - timeMin // - timeMax -// - updatedMin If the syncToken expires, the server will respond with a -// 410 GONE response code and the client should clear its storage and -// perform a full synchronization without any syncToken. +// - updatedMin All other query parameters should be the same as for the +// initial synchronization to avoid undefined behavior. If the syncToken +// expires, the server will respond with a 410 GONE response code and +// the client should clear its storage and perform a full +// synchronization without any syncToken. // Learn more about incremental synchronization. // // The default is to return all entries. @@ -8879,7 +8883,7 @@ func (c *EventsWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { // "type": "boolean" // }, // "syncToken": { - // "description": "Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. All events deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False.\nThere are several query parameters that cannot be specified together with nextSyncToken to ensure consistency of the client state.\n\nThese are: \n- iCalUID \n- orderBy \n- privateExtendedProperty \n- q \n- sharedExtendedProperty \n- timeMin \n- timeMax \n- updatedMin If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken.\nLearn more about incremental synchronization.\nOptional. The default is to return all entries.", + // "description": "Token obtained from the nextSyncToken field returned on the last page of results from the previous list request. It makes the result of this list request contain only entries that have changed since then. All events deleted since the previous list request will always be in the result set and it is not allowed to set showDeleted to False.\nThere are several query parameters that cannot be specified together with nextSyncToken to ensure consistency of the client state.\n\nThese are: \n- iCalUID \n- orderBy \n- privateExtendedProperty \n- q \n- sharedExtendedProperty \n- timeMin \n- timeMax \n- updatedMin All other query parameters should be the same as for the initial synchronization to avoid undefined behavior. If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken.\nLearn more about incremental synchronization.\nOptional. The default is to return all entries.", // "location": "query", // "type": "string" // }, diff --git a/gkeonprem/v1/gkeonprem-api.json b/gkeonprem/v1/gkeonprem-api.json index fc6f325623b..cabbc4f3f39 100644 --- a/gkeonprem/v1/gkeonprem-api.json +++ b/gkeonprem/v1/gkeonprem-api.json @@ -2996,7 +2996,7 @@ } } }, - "revision": "20230705", + "revision": "20230717", "rootUrl": "https://gkeonprem.googleapis.com/", "schemas": { "Authorization": { @@ -4195,7 +4195,7 @@ "id": "BareMetalParallelUpgradeConfig", "properties": { "concurrentNodes": { - "description": "Required. The maximum number of nodes that can be upgraded at once. Defaults to 1.", + "description": "The maximum number of nodes that can be upgraded at once.", "format": "int32", "type": "integer" }, @@ -5513,6 +5513,11 @@ "description": "The number of mebibytes of memory for the control-plane node of the admin cluster.", "format": "int64", "type": "string" + }, + "replicas": { + "description": "The number of control plane nodes for this VMware admin cluster. (default: 1 replica).", + "format": "int64", + "type": "string" } }, "type": "object" @@ -5536,6 +5541,17 @@ }, "type": "object" }, + "VmwareAdminHAControlPlaneConfig": { + "description": "Specifies HA admin control plane config.", + "id": "VmwareAdminHAControlPlaneConfig", + "properties": { + "controlPlaneIpBlock": { + "$ref": "VmwareIpBlock", + "description": "Static IP addresses for the admin control plane nodes." + } + }, + "type": "object" + }, "VmwareAdminLoadBalancerConfig": { "description": "VmwareAdminLoadBalancerConfig contains load balancer configuration for VMware admin cluster.", "id": "VmwareAdminLoadBalancerConfig", @@ -5552,6 +5568,11 @@ "$ref": "VmwareAdminMetalLbConfig", "description": "MetalLB load balancers." }, + "seesawConfig": { + "$ref": "VmwareAdminSeesawConfig", + "description": "Output only. Configuration for Seesaw typed load balancers.", + "readOnly": true + }, "vipConfig": { "$ref": "VmwareAdminVipConfig", "description": "The VIPs used by the load balancer." @@ -5604,6 +5625,10 @@ "$ref": "VmwareDhcpIpConfig", "description": "Configuration settings for a DHCP IP configuration." }, + "haControlPlaneConfig": { + "$ref": "VmwareAdminHAControlPlaneConfig", + "description": "Configuration for HA admin cluster control plane." + }, "hostConfig": { "$ref": "VmwareHostConfig", "description": "Represents common network settings irrespective of the host's IP address." @@ -5633,6 +5658,39 @@ }, "type": "object" }, + "VmwareAdminSeesawConfig": { + "description": "VmwareSeesawConfig represents configuration parameters for an already existing Seesaw load balancer. IMPORTANT: Please note that the Anthos On-Prem API will not generate or update Seesaw configurations it can only bind a pre-existing configuration to a new user cluster. IMPORTANT: When attempting to create a user cluster with a pre-existing Seesaw load balancer you will need to follow some preparation steps before calling the 'CreateVmwareCluster' API method. First you will need to create the user cluster's namespace via kubectl. The namespace will need to use the following naming convention : -gke-onprem-mgmt or -gke-onprem-mgmt depending on whether you used the 'VmwareCluster.local_name' to disambiguate collisions; for more context see the documentation of 'VmwareCluster.local_name'. Once the namespace is created you will need to create a secret resource via kubectl. This secret will contain copies of your Seesaw credentials. The Secret must be called 'user-cluster-creds' and contain Seesaw's SSH and Cert credentials. The credentials must be keyed with the following names: 'seesaw-ssh-private-key', 'seesaw-ssh-public-key', 'seesaw-ssh-ca-key', 'seesaw-ssh-ca-cert'.", + "id": "VmwareAdminSeesawConfig", + "properties": { + "enableHa": { + "description": "Enable two load balancer VMs to achieve a highly-available Seesaw load balancer.", + "type": "boolean" + }, + "group": { + "description": "In general the following format should be used for the Seesaw group name: seesaw-for-[cluster_name].", + "type": "string" + }, + "ipBlocks": { + "description": "The IP Blocks to be used by the Seesaw load balancer", + "items": { + "$ref": "VmwareIpBlock" + }, + "type": "array" + }, + "masterIp": { + "description": "MasterIP is the IP announced by the master of Seesaw group.", + "type": "string" + }, + "vms": { + "description": "Names of the VMs created for this Seesaw group.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "VmwareAdminVCenterConfig": { "description": "VmwareAdminVCenterConfig contains VCenter configuration for VMware admin cluster.", "id": "VmwareAdminVCenterConfig", @@ -5910,8 +5968,7 @@ }, "vsphereConfig": { "$ref": "VmwareControlPlaneVsphereConfig", - "description": "Output only. Vsphere-specific config.", - "readOnly": true + "description": "Vsphere-specific config." } }, "type": "object" @@ -6210,8 +6267,7 @@ }, "vsphereConfig": { "$ref": "VmwareVsphereConfig", - "description": "Output only. Specifies the vSphere config for node pool.", - "readOnly": true + "description": "Specifies the vSphere config for node pool." } }, "type": "object" diff --git a/gkeonprem/v1/gkeonprem-gen.go b/gkeonprem/v1/gkeonprem-gen.go index 06a5ca209d3..c230329ab02 100644 --- a/gkeonprem/v1/gkeonprem-gen.go +++ b/gkeonprem/v1/gkeonprem-gen.go @@ -2461,8 +2461,8 @@ func (s *BareMetalOsEnvironmentConfig) MarshalJSON() ([]byte, error) { // BareMetalParallelUpgradeConfig: BareMetalParallelUpgradeConfig // defines the parallel upgrade settings for worker node pools. type BareMetalParallelUpgradeConfig struct { - // ConcurrentNodes: Required. The maximum number of nodes that can be - // upgraded at once. Defaults to 1. + // ConcurrentNodes: The maximum number of nodes that can be upgraded at + // once. ConcurrentNodes int64 `json:"concurrentNodes,omitempty"` // MinimumAvailableNodes: The minimum number of nodes that should be @@ -4815,6 +4815,10 @@ type VmwareAdminControlPlaneNodeConfig struct { // of the admin cluster. Memory int64 `json:"memory,omitempty,string"` + // Replicas: The number of control plane nodes for this VMware admin + // cluster. (default: 1 replica). + Replicas int64 `json:"replicas,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Cpus") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -4875,6 +4879,37 @@ func (s *VmwareAdminF5BigIpConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// VmwareAdminHAControlPlaneConfig: Specifies HA admin control plane +// config. +type VmwareAdminHAControlPlaneConfig struct { + // ControlPlaneIpBlock: Static IP addresses for the admin control plane + // nodes. + ControlPlaneIpBlock *VmwareIpBlock `json:"controlPlaneIpBlock,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ControlPlaneIpBlock") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ControlPlaneIpBlock") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *VmwareAdminHAControlPlaneConfig) MarshalJSON() ([]byte, error) { + type NoMethod VmwareAdminHAControlPlaneConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // VmwareAdminLoadBalancerConfig: VmwareAdminLoadBalancerConfig contains // load balancer configuration for VMware admin cluster. type VmwareAdminLoadBalancerConfig struct { @@ -4887,6 +4922,10 @@ type VmwareAdminLoadBalancerConfig struct { // MetalLbConfig: MetalLB load balancers. MetalLbConfig *VmwareAdminMetalLbConfig `json:"metalLbConfig,omitempty"` + // SeesawConfig: Output only. Configuration for Seesaw typed load + // balancers. + SeesawConfig *VmwareAdminSeesawConfig `json:"seesawConfig,omitempty"` + // VipConfig: The VIPs used by the load balancer. VipConfig *VmwareAdminVipConfig `json:"vipConfig,omitempty"` @@ -4972,6 +5011,10 @@ type VmwareAdminNetworkConfig struct { // DhcpIpConfig: Configuration settings for a DHCP IP configuration. DhcpIpConfig *VmwareDhcpIpConfig `json:"dhcpIpConfig,omitempty"` + // HaControlPlaneConfig: Configuration for HA admin cluster control + // plane. + HaControlPlaneConfig *VmwareAdminHAControlPlaneConfig `json:"haControlPlaneConfig,omitempty"` + // HostConfig: Represents common network settings irrespective of the // host's IP address. HostConfig *VmwareHostConfig `json:"hostConfig,omitempty"` @@ -5015,6 +5058,66 @@ func (s *VmwareAdminNetworkConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// VmwareAdminSeesawConfig: VmwareSeesawConfig represents configuration +// parameters for an already existing Seesaw load balancer. IMPORTANT: +// Please note that the Anthos On-Prem API will not generate or update +// Seesaw configurations it can only bind a pre-existing configuration +// to a new user cluster. IMPORTANT: When attempting to create a user +// cluster with a pre-existing Seesaw load balancer you will need to +// follow some preparation steps before calling the +// 'CreateVmwareCluster' API method. First you will need to create the +// user cluster's namespace via kubectl. The namespace will need to use +// the following naming convention : -gke-onprem-mgmt or +// -gke-onprem-mgmt depending on whether you used the +// 'VmwareCluster.local_name' to disambiguate collisions; for more +// context see the documentation of 'VmwareCluster.local_name'. Once the +// namespace is created you will need to create a secret resource via +// kubectl. This secret will contain copies of your Seesaw credentials. +// The Secret must be called 'user-cluster-creds' and contain Seesaw's +// SSH and Cert credentials. The credentials must be keyed with the +// following names: 'seesaw-ssh-private-key', 'seesaw-ssh-public-key', +// 'seesaw-ssh-ca-key', 'seesaw-ssh-ca-cert'. +type VmwareAdminSeesawConfig struct { + // EnableHa: Enable two load balancer VMs to achieve a highly-available + // Seesaw load balancer. + EnableHa bool `json:"enableHa,omitempty"` + + // Group: In general the following format should be used for the Seesaw + // group name: seesaw-for-[cluster_name]. + Group string `json:"group,omitempty"` + + // IpBlocks: The IP Blocks to be used by the Seesaw load balancer + IpBlocks []*VmwareIpBlock `json:"ipBlocks,omitempty"` + + // MasterIp: MasterIP is the IP announced by the master of Seesaw group. + MasterIp string `json:"masterIp,omitempty"` + + // Vms: Names of the VMs created for this Seesaw group. + Vms []string `json:"vms,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EnableHa") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EnableHa") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VmwareAdminSeesawConfig) MarshalJSON() ([]byte, error) { + type NoMethod VmwareAdminSeesawConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // VmwareAdminVCenterConfig: VmwareAdminVCenterConfig contains VCenter // configuration for VMware admin cluster. type VmwareAdminVCenterConfig struct { @@ -5384,7 +5487,7 @@ type VmwareControlPlaneNodeConfig struct { // cluster. (default: 1 replica). Replicas int64 `json:"replicas,omitempty,string"` - // VsphereConfig: Output only. Vsphere-specific config. + // VsphereConfig: Vsphere-specific config. VsphereConfig *VmwareControlPlaneVsphereConfig `json:"vsphereConfig,omitempty"` // ForceSendFields is a list of field names (e.g. "AutoResizeConfig") to @@ -5897,8 +6000,7 @@ type VmwareNodeConfig struct { // Taints: The initial taints assigned to nodes of this node pool. Taints []*NodeTaint `json:"taints,omitempty"` - // VsphereConfig: Output only. Specifies the vSphere config for node - // pool. + // VsphereConfig: Specifies the vSphere config for node pool. VsphereConfig *VmwareVsphereConfig `json:"vsphereConfig,omitempty"` // ForceSendFields is a list of field names (e.g. "BootDiskSizeGb") to diff --git a/serviceconsumermanagement/v1/serviceconsumermanagement-api.json b/serviceconsumermanagement/v1/serviceconsumermanagement-api.json index 65a79602510..6331742dc1f 100644 --- a/serviceconsumermanagement/v1/serviceconsumermanagement-api.json +++ b/serviceconsumermanagement/v1/serviceconsumermanagement-api.json @@ -542,7 +542,7 @@ } } }, - "revision": "20230704", + "revision": "20230719", "rootUrl": "https://serviceconsumermanagement.googleapis.com/", "schemas": { "AddTenantProjectRequest": { @@ -1030,6 +1030,13 @@ "environment": { "description": "The service controller environment to use. If empty, no control plane feature (like quota and billing) will be enabled. The recommended value for most services is servicecontrol.googleapis.com", "type": "string" + }, + "methodPolicies": { + "description": "Defines policies applying to the API methods of the service.", + "items": { + "$ref": "MethodPolicy" + }, + "type": "array" } }, "type": "object" @@ -1440,6 +1447,25 @@ }, "type": "object" }, + "FieldPolicy": { + "description": "Google API Policy Annotation This message defines a simple API policy annotation that can be used to annotate API request and response message fields with applicable policies. One field may have multiple applicable policies that must all be satisfied before a request can be processed. This policy annotation is used to generate the overall policy that will be used for automatic runtime policy enforcement and documentation generation.", + "id": "FieldPolicy", + "properties": { + "resourcePermission": { + "description": "Specifies the required permission(s) for the resource referred to by the field. It requires the field contains a valid resource reference, and the request must pass the permission checks to proceed. For example, \"resourcemanager.projects.get\".", + "type": "string" + }, + "resourceType": { + "description": "Specifies the resource type for the resource referred to by the field.", + "type": "string" + }, + "selector": { + "description": "Selects one or more request or response message fields to apply this `FieldPolicy`. When a `FieldPolicy` is used in proto annotation, the selector must be left as empty. The service config generator will automatically fill the correct value. When a `FieldPolicy` is used in service config, the selector must be a comma-separated string with valid request or response field paths, such as \"foo.bar\" or \"foo.bar,foo.baz\".", + "type": "string" + } + }, + "type": "object" + }, "GoSettings": { "description": "Settings for Go client libraries.", "id": "GoSettings", @@ -1769,6 +1795,24 @@ }, "type": "object" }, + "MethodPolicy": { + "description": "Defines policies applying to an RPC method.", + "id": "MethodPolicy", + "properties": { + "requestPolicies": { + "description": "Policies that are applicable to the request message.", + "items": { + "$ref": "FieldPolicy" + }, + "type": "array" + }, + "selector": { + "description": "Selects a method to which these policies should be enforced, for example, \"google.pubsub.v1.Subscriber.CreateSubscription\". Refer to selector for syntax details. NOTE: This field must not be set in the proto annotation. It will be automatically filled by the service config compiler .", + "type": "string" + } + }, + "type": "object" + }, "MethodSettings": { "description": "Describes the generator configuration for a method.", "id": "MethodSettings", diff --git a/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go b/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go index a1185e0aabc..5b33cc1df0e 100644 --- a/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go +++ b/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go @@ -1086,6 +1086,10 @@ type Control struct { // recommended value for most services is servicecontrol.googleapis.com Environment string `json:"environment,omitempty"` + // MethodPolicies: Defines policies applying to the API methods of the + // service. + MethodPolicies []*MethodPolicy `json:"methodPolicies,omitempty"` + // ForceSendFields is a list of field names (e.g. "Environment") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1752,6 +1756,57 @@ func (s *Field) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// FieldPolicy: Google API Policy Annotation This message defines a +// simple API policy annotation that can be used to annotate API request +// and response message fields with applicable policies. One field may +// have multiple applicable policies that must all be satisfied before a +// request can be processed. This policy annotation is used to generate +// the overall policy that will be used for automatic runtime policy +// enforcement and documentation generation. +type FieldPolicy struct { + // ResourcePermission: Specifies the required permission(s) for the + // resource referred to by the field. It requires the field contains a + // valid resource reference, and the request must pass the permission + // checks to proceed. For example, "resourcemanager.projects.get". + ResourcePermission string `json:"resourcePermission,omitempty"` + + // ResourceType: Specifies the resource type for the resource referred + // to by the field. + ResourceType string `json:"resourceType,omitempty"` + + // Selector: Selects one or more request or response message fields to + // apply this `FieldPolicy`. When a `FieldPolicy` is used in proto + // annotation, the selector must be left as empty. The service config + // generator will automatically fill the correct value. When a + // `FieldPolicy` is used in service config, the selector must be a + // comma-separated string with valid request or response field paths, + // such as "foo.bar" or "foo.bar,foo.baz". + Selector string `json:"selector,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ResourcePermission") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ResourcePermission") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *FieldPolicy) MarshalJSON() ([]byte, error) { + type NoMethod FieldPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoSettings: Settings for Go client libraries. type GoSettings struct { // Common: Some settings. @@ -2489,6 +2544,43 @@ func (s *Method) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MethodPolicy: Defines policies applying to an RPC method. +type MethodPolicy struct { + // RequestPolicies: Policies that are applicable to the request message. + RequestPolicies []*FieldPolicy `json:"requestPolicies,omitempty"` + + // Selector: Selects a method to which these policies should be + // enforced, for example, + // "google.pubsub.v1.Subscriber.CreateSubscription". Refer to selector + // for syntax details. NOTE: This field must not be set in the proto + // annotation. It will be automatically filled by the service config + // compiler . + Selector string `json:"selector,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestPolicies") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RequestPolicies") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *MethodPolicy) MarshalJSON() ([]byte, error) { + type NoMethod MethodPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MethodSettings: Describes the generator configuration for a method. type MethodSettings struct { // LongRunning: Describes settings to use for long-running operations diff --git a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json index 5aa214f18cf..8e5641e5a55 100644 --- a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json +++ b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json @@ -500,7 +500,7 @@ } } }, - "revision": "20230704", + "revision": "20230719", "rootUrl": "https://serviceconsumermanagement.googleapis.com/", "schemas": { "Api": { @@ -922,6 +922,13 @@ "environment": { "description": "The service controller environment to use. If empty, no control plane feature (like quota and billing) will be enabled. The recommended value for most services is servicecontrol.googleapis.com", "type": "string" + }, + "methodPolicies": { + "description": "Defines policies applying to the API methods of the service.", + "items": { + "$ref": "MethodPolicy" + }, + "type": "array" } }, "type": "object" @@ -1310,6 +1317,25 @@ }, "type": "object" }, + "FieldPolicy": { + "description": "Google API Policy Annotation This message defines a simple API policy annotation that can be used to annotate API request and response message fields with applicable policies. One field may have multiple applicable policies that must all be satisfied before a request can be processed. This policy annotation is used to generate the overall policy that will be used for automatic runtime policy enforcement and documentation generation.", + "id": "FieldPolicy", + "properties": { + "resourcePermission": { + "description": "Specifies the required permission(s) for the resource referred to by the field. It requires the field contains a valid resource reference, and the request must pass the permission checks to proceed. For example, \"resourcemanager.projects.get\".", + "type": "string" + }, + "resourceType": { + "description": "Specifies the resource type for the resource referred to by the field.", + "type": "string" + }, + "selector": { + "description": "Selects one or more request or response message fields to apply this `FieldPolicy`. When a `FieldPolicy` is used in proto annotation, the selector must be left as empty. The service config generator will automatically fill the correct value. When a `FieldPolicy` is used in service config, the selector must be a comma-separated string with valid request or response field paths, such as \"foo.bar\" or \"foo.bar,foo.baz\".", + "type": "string" + } + }, + "type": "object" + }, "GoSettings": { "description": "Settings for Go client libraries.", "id": "GoSettings", @@ -1603,6 +1629,24 @@ }, "type": "object" }, + "MethodPolicy": { + "description": "Defines policies applying to an RPC method.", + "id": "MethodPolicy", + "properties": { + "requestPolicies": { + "description": "Policies that are applicable to the request message.", + "items": { + "$ref": "FieldPolicy" + }, + "type": "array" + }, + "selector": { + "description": "Selects a method to which these policies should be enforced, for example, \"google.pubsub.v1.Subscriber.CreateSubscription\". Refer to selector for syntax details. NOTE: This field must not be set in the proto annotation. It will be automatically filled by the service config compiler .", + "type": "string" + } + }, + "type": "object" + }, "MethodSettings": { "description": "Describes the generator configuration for a method.", "id": "MethodSettings", diff --git a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go index a5bda59d15c..df9f05e41f2 100644 --- a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go +++ b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go @@ -965,6 +965,10 @@ type Control struct { // recommended value for most services is servicecontrol.googleapis.com Environment string `json:"environment,omitempty"` + // MethodPolicies: Defines policies applying to the API methods of the + // service. + MethodPolicies []*MethodPolicy `json:"methodPolicies,omitempty"` + // ForceSendFields is a list of field names (e.g. "Environment") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1563,6 +1567,57 @@ func (s *Field) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// FieldPolicy: Google API Policy Annotation This message defines a +// simple API policy annotation that can be used to annotate API request +// and response message fields with applicable policies. One field may +// have multiple applicable policies that must all be satisfied before a +// request can be processed. This policy annotation is used to generate +// the overall policy that will be used for automatic runtime policy +// enforcement and documentation generation. +type FieldPolicy struct { + // ResourcePermission: Specifies the required permission(s) for the + // resource referred to by the field. It requires the field contains a + // valid resource reference, and the request must pass the permission + // checks to proceed. For example, "resourcemanager.projects.get". + ResourcePermission string `json:"resourcePermission,omitempty"` + + // ResourceType: Specifies the resource type for the resource referred + // to by the field. + ResourceType string `json:"resourceType,omitempty"` + + // Selector: Selects one or more request or response message fields to + // apply this `FieldPolicy`. When a `FieldPolicy` is used in proto + // annotation, the selector must be left as empty. The service config + // generator will automatically fill the correct value. When a + // `FieldPolicy` is used in service config, the selector must be a + // comma-separated string with valid request or response field paths, + // such as "foo.bar" or "foo.bar,foo.baz". + Selector string `json:"selector,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ResourcePermission") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ResourcePermission") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *FieldPolicy) MarshalJSON() ([]byte, error) { + type NoMethod FieldPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoSettings: Settings for Go client libraries. type GoSettings struct { // Common: Some settings. @@ -2228,6 +2283,43 @@ func (s *Method) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MethodPolicy: Defines policies applying to an RPC method. +type MethodPolicy struct { + // RequestPolicies: Policies that are applicable to the request message. + RequestPolicies []*FieldPolicy `json:"requestPolicies,omitempty"` + + // Selector: Selects a method to which these policies should be + // enforced, for example, + // "google.pubsub.v1.Subscriber.CreateSubscription". Refer to selector + // for syntax details. NOTE: This field must not be set in the proto + // annotation. It will be automatically filled by the service config + // compiler . + Selector string `json:"selector,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestPolicies") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RequestPolicies") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *MethodPolicy) MarshalJSON() ([]byte, error) { + type NoMethod MethodPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MethodSettings: Describes the generator configuration for a method. type MethodSettings struct { // LongRunning: Describes settings to use for long-running operations diff --git a/serviceusage/v1/serviceusage-api.json b/serviceusage/v1/serviceusage-api.json index a004898f3b7..e6ca2d16316 100644 --- a/serviceusage/v1/serviceusage-api.json +++ b/serviceusage/v1/serviceusage-api.json @@ -426,7 +426,7 @@ } } }, - "revision": "20230710", + "revision": "20230719", "rootUrl": "https://serviceusage.googleapis.com/", "schemas": { "AddEnableRulesMetadata": { @@ -1025,6 +1025,13 @@ "environment": { "description": "The service controller environment to use. If empty, no control plane feature (like quota and billing) will be enabled. The recommended value for most services is servicecontrol.googleapis.com", "type": "string" + }, + "methodPolicies": { + "description": "Defines policies applying to the API methods of the service.", + "items": { + "$ref": "MethodPolicy" + }, + "type": "array" } }, "type": "object" @@ -1539,6 +1546,25 @@ }, "type": "object" }, + "FieldPolicy": { + "description": "Google API Policy Annotation This message defines a simple API policy annotation that can be used to annotate API request and response message fields with applicable policies. One field may have multiple applicable policies that must all be satisfied before a request can be processed. This policy annotation is used to generate the overall policy that will be used for automatic runtime policy enforcement and documentation generation.", + "id": "FieldPolicy", + "properties": { + "resourcePermission": { + "description": "Specifies the required permission(s) for the resource referred to by the field. It requires the field contains a valid resource reference, and the request must pass the permission checks to proceed. For example, \"resourcemanager.projects.get\".", + "type": "string" + }, + "resourceType": { + "description": "Specifies the resource type for the resource referred to by the field.", + "type": "string" + }, + "selector": { + "description": "Selects one or more request or response message fields to apply this `FieldPolicy`. When a `FieldPolicy` is used in proto annotation, the selector must be left as empty. The service config generator will automatically fill the correct value. When a `FieldPolicy` is used in service config, the selector must be a comma-separated string with valid request or response field paths, such as \"foo.bar\" or \"foo.bar,foo.baz\".", + "type": "string" + } + }, + "type": "object" + }, "GetServiceIdentityMetadata": { "description": "Metadata for the `GetServiceIdentity` method.", "id": "GetServiceIdentityMetadata", @@ -2242,6 +2268,24 @@ }, "type": "object" }, + "MethodPolicy": { + "description": "Defines policies applying to an RPC method.", + "id": "MethodPolicy", + "properties": { + "requestPolicies": { + "description": "Policies that are applicable to the request message.", + "items": { + "$ref": "FieldPolicy" + }, + "type": "array" + }, + "selector": { + "description": "Selects a method to which these policies should be enforced, for example, \"google.pubsub.v1.Subscriber.CreateSubscription\". Refer to selector for syntax details. NOTE: This field must not be set in the proto annotation. It will be automatically filled by the service config compiler .", + "type": "string" + } + }, + "type": "object" + }, "MethodSettings": { "description": "Describes the generator configuration for a method.", "id": "MethodSettings", diff --git a/serviceusage/v1/serviceusage-gen.go b/serviceusage/v1/serviceusage-gen.go index 8e3177a9daf..35901aece8b 100644 --- a/serviceusage/v1/serviceusage-gen.go +++ b/serviceusage/v1/serviceusage-gen.go @@ -1260,6 +1260,10 @@ type Control struct { // recommended value for most services is servicecontrol.googleapis.com Environment string `json:"environment,omitempty"` + // MethodPolicies: Defines policies applying to the API methods of the + // service. + MethodPolicies []*MethodPolicy `json:"methodPolicies,omitempty"` + // ForceSendFields is a list of field names (e.g. "Environment") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2077,6 +2081,57 @@ func (s *Field) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// FieldPolicy: Google API Policy Annotation This message defines a +// simple API policy annotation that can be used to annotate API request +// and response message fields with applicable policies. One field may +// have multiple applicable policies that must all be satisfied before a +// request can be processed. This policy annotation is used to generate +// the overall policy that will be used for automatic runtime policy +// enforcement and documentation generation. +type FieldPolicy struct { + // ResourcePermission: Specifies the required permission(s) for the + // resource referred to by the field. It requires the field contains a + // valid resource reference, and the request must pass the permission + // checks to proceed. For example, "resourcemanager.projects.get". + ResourcePermission string `json:"resourcePermission,omitempty"` + + // ResourceType: Specifies the resource type for the resource referred + // to by the field. + ResourceType string `json:"resourceType,omitempty"` + + // Selector: Selects one or more request or response message fields to + // apply this `FieldPolicy`. When a `FieldPolicy` is used in proto + // annotation, the selector must be left as empty. The service config + // generator will automatically fill the correct value. When a + // `FieldPolicy` is used in service config, the selector must be a + // comma-separated string with valid request or response field paths, + // such as "foo.bar" or "foo.bar,foo.baz". + Selector string `json:"selector,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ResourcePermission") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ResourcePermission") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *FieldPolicy) MarshalJSON() ([]byte, error) { + type NoMethod FieldPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GetServiceIdentityMetadata: Metadata for the `GetServiceIdentity` // method. type GetServiceIdentityMetadata struct { @@ -3350,6 +3405,43 @@ func (s *Method) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MethodPolicy: Defines policies applying to an RPC method. +type MethodPolicy struct { + // RequestPolicies: Policies that are applicable to the request message. + RequestPolicies []*FieldPolicy `json:"requestPolicies,omitempty"` + + // Selector: Selects a method to which these policies should be + // enforced, for example, + // "google.pubsub.v1.Subscriber.CreateSubscription". Refer to selector + // for syntax details. NOTE: This field must not be set in the proto + // annotation. It will be automatically filled by the service config + // compiler . + Selector string `json:"selector,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestPolicies") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RequestPolicies") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *MethodPolicy) MarshalJSON() ([]byte, error) { + type NoMethod MethodPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MethodSettings: Describes the generator configuration for a method. type MethodSettings struct { // LongRunning: Describes settings to use for long-running operations diff --git a/serviceusage/v1beta1/serviceusage-api.json b/serviceusage/v1beta1/serviceusage-api.json index 7c15e279000..b390a628a2c 100644 --- a/serviceusage/v1beta1/serviceusage-api.json +++ b/serviceusage/v1beta1/serviceusage-api.json @@ -964,7 +964,7 @@ } } }, - "revision": "20230710", + "revision": "20230719", "rootUrl": "https://serviceusage.googleapis.com/", "schemas": { "AddEnableRulesMetadata": { @@ -1621,6 +1621,13 @@ "environment": { "description": "The service controller environment to use. If empty, no control plane feature (like quota and billing) will be enabled. The recommended value for most services is servicecontrol.googleapis.com", "type": "string" + }, + "methodPolicies": { + "description": "Defines policies applying to the API methods of the service.", + "items": { + "$ref": "MethodPolicy" + }, + "type": "array" } }, "type": "object" @@ -2116,6 +2123,25 @@ }, "type": "object" }, + "FieldPolicy": { + "description": "Google API Policy Annotation This message defines a simple API policy annotation that can be used to annotate API request and response message fields with applicable policies. One field may have multiple applicable policies that must all be satisfied before a request can be processed. This policy annotation is used to generate the overall policy that will be used for automatic runtime policy enforcement and documentation generation.", + "id": "FieldPolicy", + "properties": { + "resourcePermission": { + "description": "Specifies the required permission(s) for the resource referred to by the field. It requires the field contains a valid resource reference, and the request must pass the permission checks to proceed. For example, \"resourcemanager.projects.get\".", + "type": "string" + }, + "resourceType": { + "description": "Specifies the resource type for the resource referred to by the field.", + "type": "string" + }, + "selector": { + "description": "Selects one or more request or response message fields to apply this `FieldPolicy`. When a `FieldPolicy` is used in proto annotation, the selector must be left as empty. The service config generator will automatically fill the correct value. When a `FieldPolicy` is used in service config, the selector must be a comma-separated string with valid request or response field paths, such as \"foo.bar\" or \"foo.bar,foo.baz\".", + "type": "string" + } + }, + "type": "object" + }, "GetServiceIdentityMetadata": { "description": "Metadata for the `GetServiceIdentity` method.", "id": "GetServiceIdentityMetadata", @@ -2937,6 +2963,24 @@ }, "type": "object" }, + "MethodPolicy": { + "description": "Defines policies applying to an RPC method.", + "id": "MethodPolicy", + "properties": { + "requestPolicies": { + "description": "Policies that are applicable to the request message.", + "items": { + "$ref": "FieldPolicy" + }, + "type": "array" + }, + "selector": { + "description": "Selects a method to which these policies should be enforced, for example, \"google.pubsub.v1.Subscriber.CreateSubscription\". Refer to selector for syntax details. NOTE: This field must not be set in the proto annotation. It will be automatically filled by the service config compiler .", + "type": "string" + } + }, + "type": "object" + }, "MethodSettings": { "description": "Describes the generator configuration for a method.", "id": "MethodSettings", diff --git a/serviceusage/v1beta1/serviceusage-gen.go b/serviceusage/v1beta1/serviceusage-gen.go index 8a41c2ada57..936837a61fd 100644 --- a/serviceusage/v1beta1/serviceusage-gen.go +++ b/serviceusage/v1beta1/serviceusage-gen.go @@ -1398,6 +1398,10 @@ type Control struct { // recommended value for most services is servicecontrol.googleapis.com Environment string `json:"environment,omitempty"` + // MethodPolicies: Defines policies applying to the API methods of the + // service. + MethodPolicies []*MethodPolicy `json:"methodPolicies,omitempty"` + // ForceSendFields is a list of field names (e.g. "Environment") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2169,6 +2173,57 @@ func (s *Field) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// FieldPolicy: Google API Policy Annotation This message defines a +// simple API policy annotation that can be used to annotate API request +// and response message fields with applicable policies. One field may +// have multiple applicable policies that must all be satisfied before a +// request can be processed. This policy annotation is used to generate +// the overall policy that will be used for automatic runtime policy +// enforcement and documentation generation. +type FieldPolicy struct { + // ResourcePermission: Specifies the required permission(s) for the + // resource referred to by the field. It requires the field contains a + // valid resource reference, and the request must pass the permission + // checks to proceed. For example, "resourcemanager.projects.get". + ResourcePermission string `json:"resourcePermission,omitempty"` + + // ResourceType: Specifies the resource type for the resource referred + // to by the field. + ResourceType string `json:"resourceType,omitempty"` + + // Selector: Selects one or more request or response message fields to + // apply this `FieldPolicy`. When a `FieldPolicy` is used in proto + // annotation, the selector must be left as empty. The service config + // generator will automatically fill the correct value. When a + // `FieldPolicy` is used in service config, the selector must be a + // comma-separated string with valid request or response field paths, + // such as "foo.bar" or "foo.bar,foo.baz". + Selector string `json:"selector,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ResourcePermission") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ResourcePermission") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *FieldPolicy) MarshalJSON() ([]byte, error) { + type NoMethod FieldPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GetServiceIdentityMetadata: Metadata for the `GetServiceIdentity` // method. type GetServiceIdentityMetadata struct { @@ -3649,6 +3704,43 @@ func (s *Method) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MethodPolicy: Defines policies applying to an RPC method. +type MethodPolicy struct { + // RequestPolicies: Policies that are applicable to the request message. + RequestPolicies []*FieldPolicy `json:"requestPolicies,omitempty"` + + // Selector: Selects a method to which these policies should be + // enforced, for example, + // "google.pubsub.v1.Subscriber.CreateSubscription". Refer to selector + // for syntax details. NOTE: This field must not be set in the proto + // annotation. It will be automatically filled by the service config + // compiler . + Selector string `json:"selector,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestPolicies") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RequestPolicies") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *MethodPolicy) MarshalJSON() ([]byte, error) { + type NoMethod MethodPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MethodSettings: Describes the generator configuration for a method. type MethodSettings struct { // LongRunning: Describes settings to use for long-running operations diff --git a/tpu/v2alpha1/tpu-api.json b/tpu/v2alpha1/tpu-api.json index 3c9c69ad838..1bc94ede653 100644 --- a/tpu/v2alpha1/tpu-api.json +++ b/tpu/v2alpha1/tpu-api.json @@ -897,7 +897,7 @@ } } }, - "revision": "20230707", + "revision": "20230717", "rootUrl": "https://tpu.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -1761,6 +1761,21 @@ ], "type": "string" }, + "stateInitiator": { + "description": "Output only. The initiator of the QueuedResources's current state.", + "enum": [ + "STATE_INITIATOR_UNSPECIFIED", + "USER", + "SERVICE" + ], + "enumDescriptions": [ + "The state initiator is unspecified.", + "The current QueuedResource state was initiated by the user.", + "The current QueuedResource state was initiated by the service." + ], + "readOnly": true, + "type": "string" + }, "suspendedData": { "$ref": "SuspendedData", "description": "Further data for the suspended state." diff --git a/tpu/v2alpha1/tpu-gen.go b/tpu/v2alpha1/tpu-gen.go index f905f8c2066..17494d1ade2 100644 --- a/tpu/v2alpha1/tpu-gen.go +++ b/tpu/v2alpha1/tpu-gen.go @@ -1466,6 +1466,17 @@ type QueuedResourceState struct { // have been deleted. State string `json:"state,omitempty"` + // StateInitiator: Output only. The initiator of the QueuedResources's + // current state. + // + // Possible values: + // "STATE_INITIATOR_UNSPECIFIED" - The state initiator is unspecified. + // "USER" - The current QueuedResource state was initiated by the + // user. + // "SERVICE" - The current QueuedResource state was initiated by the + // service. + StateInitiator string `json:"stateInitiator,omitempty"` + // SuspendedData: Further data for the suspended state. SuspendedData *SuspendedData `json:"suspendedData,omitempty"`