From c4024ed757507b9e711a1c57b9efcd265a36be5f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 17 Sep 2023 00:22:14 -0700 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2166) --- beyondcorp/v1/beyondcorp-api.json | 93 +++++- beyondcorp/v1/beyondcorp-gen.go | 485 ++++++++++++++++++++++++++++++ notebooks/v1/notebooks-api.json | 170 ++++++++--- notebooks/v1/notebooks-gen.go | 233 ++++++++++---- notebooks/v2/notebooks-api.json | 16 +- notebooks/v2/notebooks-gen.go | 39 ++- 6 files changed, 936 insertions(+), 100 deletions(-) diff --git a/beyondcorp/v1/beyondcorp-api.json b/beyondcorp/v1/beyondcorp-api.json index 36749036447..562c2fb4684 100644 --- a/beyondcorp/v1/beyondcorp-api.json +++ b/beyondcorp/v1/beyondcorp-api.json @@ -202,6 +202,97 @@ } }, "resources": { + "browserDlpRules": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/organizations/{organizationsId}/locations/global/partnerTenants/{partnerTenantsId}/browserDlpRules/{browserDlpRulesId}:getIamPolicy", + "httpMethod": "GET", + "id": "beyondcorp.organizations.locations.global.partnerTenants.browserDlpRules.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "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": "^organizations/[^/]+/locations/global/partnerTenants/[^/]+/browserDlpRules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/organizations/{organizationsId}/locations/global/partnerTenants/{partnerTenantsId}/browserDlpRules/{browserDlpRulesId}:setIamPolicy", + "httpMethod": "POST", + "id": "beyondcorp.organizations.locations.global.partnerTenants.browserDlpRules.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": "^organizations/[^/]+/locations/global/partnerTenants/[^/]+/browserDlpRules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/organizations/{organizationsId}/locations/global/partnerTenants/{partnerTenantsId}/browserDlpRules/{browserDlpRulesId}:testIamPermissions", + "httpMethod": "POST", + "id": "beyondcorp.organizations.locations.global.partnerTenants.browserDlpRules.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": "^organizations/[^/]+/locations/global/partnerTenants/[^/]+/browserDlpRules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "proxyConfigs": { "methods": { "getIamPolicy": { @@ -1713,7 +1804,7 @@ } } }, - "revision": "20230823", + "revision": "20230911", "rootUrl": "https://beyondcorp.googleapis.com/", "schemas": { "AllocatedConnection": { diff --git a/beyondcorp/v1/beyondcorp-gen.go b/beyondcorp/v1/beyondcorp-gen.go index bb206e7afeb..1bab2bc89c9 100644 --- a/beyondcorp/v1/beyondcorp-gen.go +++ b/beyondcorp/v1/beyondcorp-gen.go @@ -195,6 +195,7 @@ type OrganizationsLocationsGlobalService struct { func NewOrganizationsLocationsGlobalPartnerTenantsService(s *Service) *OrganizationsLocationsGlobalPartnerTenantsService { rs := &OrganizationsLocationsGlobalPartnerTenantsService{s: s} + rs.BrowserDlpRules = NewOrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesService(s) rs.ProxyConfigs = NewOrganizationsLocationsGlobalPartnerTenantsProxyConfigsService(s) return rs } @@ -202,9 +203,20 @@ func NewOrganizationsLocationsGlobalPartnerTenantsService(s *Service) *Organizat type OrganizationsLocationsGlobalPartnerTenantsService struct { s *Service + BrowserDlpRules *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesService + ProxyConfigs *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsService } +func NewOrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesService(s *Service) *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesService { + rs := &OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesService{s: s} + return rs +} + +type OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesService struct { + s *Service +} + func NewOrganizationsLocationsGlobalPartnerTenantsProxyConfigsService(s *Service) *OrganizationsLocationsGlobalPartnerTenantsProxyConfigsService { rs := &OrganizationsLocationsGlobalPartnerTenantsProxyConfigsService{s: s} return rs @@ -3265,6 +3277,479 @@ func (c *OrganizationsLocationsGlobalPartnerTenantsTestIamPermissionsCall) Do(op } +// method id "beyondcorp.organizations.locations.global.partnerTenants.browserDlpRules.getIamPolicy": + +type OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and 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 *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesService) GetIamPolicy(resource string) *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesGetIamPolicyCall { + c := &OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + 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 *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesGetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesGetIamPolicyCall) IfNoneMatch(entityTag string) *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + 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 *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesGetIamPolicyCall) Context(ctx context.Context) *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesGetIamPolicyCall { + 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 *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesGetIamPolicyCall) 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()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", 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 "beyondcorp.organizations.locations.global.partnerTenants.browserDlpRules.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 := &GoogleIamV1Policy{ + 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 resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/organizations/{organizationsId}/locations/global/partnerTenants/{partnerTenantsId}/browserDlpRules/{browserDlpRulesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "beyondcorp.organizations.locations.global.partnerTenants.browserDlpRules.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "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": "^organizations/[^/]+/locations/global/partnerTenants/[^/]+/browserDlpRules/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.organizations.locations.global.partnerTenants.browserDlpRules.setIamPolicy": + +type OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - 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 *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesSetIamPolicyCall { + c := &OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + 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 *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesSetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesSetIamPolicyCall { + 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 *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesSetIamPolicyCall) Context(ctx context.Context) *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesSetIamPolicyCall { + 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 *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesSetIamPolicyCall) 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.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 "beyondcorp.organizations.locations.global.partnerTenants.browserDlpRules.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 := &GoogleIamV1Policy{ + 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 the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/organizations/{organizationsId}/locations/global/partnerTenants/{partnerTenantsId}/browserDlpRules/{browserDlpRulesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "beyondcorp.organizations.locations.global.partnerTenants.browserDlpRules.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": "^organizations/[^/]+/locations/global/partnerTenants/[^/]+/browserDlpRules/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.organizations.locations.global.partnerTenants.browserDlpRules.testIamPermissions": + +type OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - 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 *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesTestIamPermissionsCall { + c := &OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + 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 *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesTestIamPermissionsCall { + 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 *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesTestIamPermissionsCall) Context(ctx context.Context) *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesTestIamPermissionsCall { + 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 *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesTestIamPermissionsCall) 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.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 "beyondcorp.organizations.locations.global.partnerTenants.browserDlpRules.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.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 *OrganizationsLocationsGlobalPartnerTenantsBrowserDlpRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, 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 := &GoogleIamV1TestIamPermissionsResponse{ + 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 a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/organizations/{organizationsId}/locations/global/partnerTenants/{partnerTenantsId}/browserDlpRules/{browserDlpRulesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "beyondcorp.organizations.locations.global.partnerTenants.browserDlpRules.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": "^organizations/[^/]+/locations/global/partnerTenants/[^/]+/browserDlpRules/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "beyondcorp.organizations.locations.global.partnerTenants.proxyConfigs.getIamPolicy": type OrganizationsLocationsGlobalPartnerTenantsProxyConfigsGetIamPolicyCall struct { diff --git a/notebooks/v1/notebooks-api.json b/notebooks/v1/notebooks-api.json index 13dcc5b3506..94a651d14e1 100644 --- a/notebooks/v1/notebooks-api.json +++ b/notebooks/v1/notebooks-api.json @@ -655,6 +655,16 @@ "parent" ], "parameters": { + "filter": { + "description": "Optional. List filter.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).", + "location": "query", + "type": "string" + }, "pageSize": { "description": "Maximum return size of the list call.", "format": "int32", @@ -1446,6 +1456,16 @@ "parent" ], "parameters": { + "filter": { + "description": "Optional. List filter.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).", + "location": "query", + "type": "string" + }, "pageSize": { "description": "Maximum return size of the list call.", "format": "int32", @@ -1932,7 +1952,7 @@ } } }, - "revision": "20230720", + "revision": "20230906", "rootUrl": "https://notebooks.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -1954,6 +1974,7 @@ "NVIDIA_TESLA_P4", "NVIDIA_TESLA_T4", "NVIDIA_TESLA_A100", + "NVIDIA_L4", "NVIDIA_TESLA_T4_VWS", "NVIDIA_TESLA_P100_VWS", "NVIDIA_TESLA_P4_VWS", @@ -1968,6 +1989,7 @@ "Accelerator type is Nvidia Tesla P4.", "Accelerator type is Nvidia Tesla T4.", "Accelerator type is Nvidia Tesla A100.", + "Accelerator type is Nvidia Tesla L4.", "Accelerator type is NVIDIA Tesla T4 Virtual Workstations.", "Accelerator type is NVIDIA Tesla P100 Virtual Workstations.", "Accelerator type is NVIDIA Tesla P4 Virtual Workstations.", @@ -2598,6 +2620,11 @@ "description": "Whether the end user authorizes Google Cloud to install GPU driver on this instance. If this field is empty or set to false, the GPU driver won't be installed. Only applicable to instances with GPUs.", "type": "boolean" }, + "instanceMigrationEligibility": { + "$ref": "InstanceMigrationEligibility", + "description": "Output only. Checks how feasible a migration from UmN to WbI is.", + "readOnly": true + }, "instanceOwners": { "description": "Input only. The owner of this instance after creation. Format: `alias@example.com` Currently supports one owner only. If not specified, all of the service account users of your VM instance's service account can use the instance.", "items": { @@ -2671,11 +2698,6 @@ "description": "Path to a Bash script that automatically runs after a notebook instance fully boots up. The path must be a URL or Cloud Storage path (`gs://path-to-file/file-name`).", "type": "string" }, - "preMigrationCheck": { - "$ref": "PreMigrationCheck", - "description": "Output only. Check how possible a migration from UmN to WbI is.", - "readOnly": true - }, "proxyUri": { "description": "Output only. The proxy endpoint that is used to access the Jupyter notebook.", "readOnly": true, @@ -2779,6 +2801,55 @@ }, "type": "object" }, + "InstanceMigrationEligibility": { + "description": "InstanceMigrationEligibility represents the feasibility information of a migration from UmN to WbI.", + "id": "InstanceMigrationEligibility", + "properties": { + "errors": { + "description": "Output only. Certain configurations make the UmN ineligible for an automatic migration. A manual migration is required.", + "items": { + "enum": [ + "ERROR_UNSPECIFIED", + "DATAPROC_HUB" + ], + "enumDescriptions": [ + "Default type.", + "The UmN uses Dataproc Hub and cannot be migrated." + ], + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "warnings": { + "description": "Output only. Certain configurations will be defaulted during the migration.", + "items": { + "enum": [ + "WARNING_UNSPECIFIED", + "UNSUPPORTED_MACHINE_TYPE", + "UNSUPPORTED_ACCELERATOR_TYPE", + "UNSUPPORTED_OS", + "NO_REMOVE_DATA_DISK", + "GCS_BACKUP", + "POST_STARTUP_SCRIPT" + ], + "enumDescriptions": [ + "Default type.", + "The UmN uses an machine type that's unsupported in WbI. It will be migrated with the default machine type n2-standard-4. Users can change the machine type after the migration.", + "The UmN uses an accelerator type that's unsupported in WbI. It will be migrated without an accelerator. User can attach an accelerator after the migration.", + "The UmN uses an operating system that's unsupported in WbI (e.g. Debian 10, Ubuntu). It will be replaced with Debian 11 in WbI.", + "This UmN is configured with no_remove_data_disk, which is no longer available in WbI.", + "This UmN is configured with the Cloud Storage backup feature, which is no longer available in WbI.", + "This UmN is configured with a post startup script. Please optionally provide the `post_startup_script_option` for the migration." + ], + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "IsInstanceUpgradeableResponse": { "description": "Response for checking if a notebook instance is upgradeable.", "id": "IsInstanceUpgradeableResponse", @@ -3140,7 +3211,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "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`.", + "description": "The normal, successful response of the operation. 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" } }, @@ -3188,7 +3259,7 @@ "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/).", + "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", "properties": { "bindings": { @@ -3211,33 +3282,6 @@ }, "type": "object" }, - "PreMigrationCheck": { - "description": "PreMigrationCheck checks how feasible a migration from UmN is.", - "id": "PreMigrationCheck", - "properties": { - "message": { - "description": "Message provides a summary or workaround.", - "type": "string" - }, - "result": { - "description": "Result returns the result of the check.", - "enum": [ - "RESULT_UNSPECIFIED", - "IDENTICAL", - "PARTIAL", - "NOT_RECOMMENDED" - ], - "enumDescriptions": [ - "Default type.", - "UmN can be migrated to WbI as is minus non-relevant parts.", - "Part of the UmN won't be ported. The migration might default some values.", - "UmN has too many unsupported options for a migration to WbI." - ], - "type": "string" - } - }, - "type": "object" - }, "RefreshRuntimeTokenInternalRequest": { "description": "Request for getting a new access token.", "id": "RefreshRuntimeTokenInternalRequest", @@ -3442,6 +3486,11 @@ "readOnly": true, "type": "string" }, + "runtimeMigrationEligibility": { + "$ref": "RuntimeMigrationEligibility", + "description": "Output only. Checks how feasible a migration from GmN to WbI is.", + "readOnly": true + }, "softwareConfig": { "$ref": "RuntimeSoftwareConfig", "description": "The config settings for software inside the runtime." @@ -3603,6 +3652,55 @@ }, "type": "object" }, + "RuntimeMigrationEligibility": { + "description": "RuntimeMigrationEligibility represents the feasibility information of a migration from GmN to WbI.", + "id": "RuntimeMigrationEligibility", + "properties": { + "errors": { + "description": "Output only. Certain configurations make the GmN ineligible for an automatic migration. A manual migration is required.", + "items": { + "enum": [ + "ERROR_UNSPECIFIED", + "CUSTOM_CONTAINER" + ], + "enumDescriptions": [ + "Default type.", + "The GmN is configured with custom container(s) and cannot be migrated." + ], + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "warnings": { + "description": "Output only. Certain configurations will be defaulted during the migration.", + "items": { + "enum": [ + "WARNING_UNSPECIFIED", + "UNSUPPORTED_ACCELERATOR_TYPE", + "UNSUPPORTED_OS", + "RESERVED_IP_RANGE", + "GOOGLE_MANAGED_NETWORK", + "POST_STARTUP_SCRIPT", + "SINGLE_USER" + ], + "enumDescriptions": [ + "Default type.", + "The GmN uses an accelerator type that's unsupported in WbI. It will be migrated without an accelerator. Users can attach an accelerator after the migration.", + "The GmN uses an operating system that's unsupported in WbI (e.g. Debian 10). It will be replaced with Debian 11 in WbI.", + "This GmN is configured with reserved IP range, which is no longer applicable in WbI.", + "This GmN is configured with a Google managed network. Please provide the `network` and `subnet` options for the migration.", + "This GmN is configured with a post startup script. Please optionally provide the `post_startup_script_option` for the migration.", + "This GmN is configured with single user mode. Please optionally provide the `service_account` option for the migration." + ], + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "RuntimeShieldedInstanceConfig": { "description": "A set of Shielded Instance options. See [Images using supported Shielded VM features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). Not all combinations are valid.", "id": "RuntimeShieldedInstanceConfig", @@ -3839,6 +3937,7 @@ "NVIDIA_TESLA_P4", "NVIDIA_TESLA_T4", "NVIDIA_TESLA_A100", + "NVIDIA_L4", "NVIDIA_TESLA_T4_VWS", "NVIDIA_TESLA_P100_VWS", "NVIDIA_TESLA_P4_VWS", @@ -3853,6 +3952,7 @@ "Accelerator type is Nvidia Tesla P4.", "Accelerator type is Nvidia Tesla T4.", "Accelerator type is Nvidia Tesla A100.", + "Accelerator type is Nvidia Tesla L4.", "Accelerator type is NVIDIA Tesla T4 Virtual Workstations.", "Accelerator type is NVIDIA Tesla P100 Virtual Workstations.", "Accelerator type is NVIDIA Tesla P4 Virtual Workstations.", diff --git a/notebooks/v1/notebooks-gen.go b/notebooks/v1/notebooks-gen.go index d30c251196e..a7df2eaf03c 100644 --- a/notebooks/v1/notebooks-gen.go +++ b/notebooks/v1/notebooks-gen.go @@ -263,6 +263,7 @@ type AcceleratorConfig struct { // "NVIDIA_TESLA_P4" - Accelerator type is Nvidia Tesla P4. // "NVIDIA_TESLA_T4" - Accelerator type is Nvidia Tesla T4. // "NVIDIA_TESLA_A100" - Accelerator type is Nvidia Tesla A100. + // "NVIDIA_L4" - Accelerator type is Nvidia Tesla L4. // "NVIDIA_TESLA_T4_VWS" - Accelerator type is NVIDIA Tesla T4 Virtual // Workstations. // "NVIDIA_TESLA_P100_VWS" - Accelerator type is NVIDIA Tesla P100 @@ -1252,6 +1253,10 @@ type Instance struct { // instances with GPUs. InstallGpuDriver bool `json:"installGpuDriver,omitempty"` + // InstanceMigrationEligibility: Output only. Checks how feasible a + // migration from UmN to WbI is. + InstanceMigrationEligibility *InstanceMigrationEligibility `json:"instanceMigrationEligibility,omitempty"` + // InstanceOwners: Input only. The owner of this instance after // creation. Format: `alias@example.com` Currently supports one owner // only. If not specified, all of the service account users of your VM @@ -1315,10 +1320,6 @@ type Instance struct { // Cloud Storage path (`gs://path-to-file/file-name`). PostStartupScript string `json:"postStartupScript,omitempty"` - // PreMigrationCheck: Output only. Check how possible a migration from - // UmN to WbI is. - PreMigrationCheck *PreMigrationCheck `json:"preMigrationCheck,omitempty"` - // ProxyUri: Output only. The proxy endpoint that is used to access the // Jupyter notebook. ProxyUri string `json:"proxyUri,omitempty"` @@ -1452,6 +1453,63 @@ func (s *InstanceConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InstanceMigrationEligibility: InstanceMigrationEligibility represents +// the feasibility information of a migration from UmN to WbI. +type InstanceMigrationEligibility struct { + // Errors: Output only. Certain configurations make the UmN ineligible + // for an automatic migration. A manual migration is required. + // + // Possible values: + // "ERROR_UNSPECIFIED" - Default type. + // "DATAPROC_HUB" - The UmN uses Dataproc Hub and cannot be migrated. + Errors []string `json:"errors,omitempty"` + + // Warnings: Output only. Certain configurations will be defaulted + // during the migration. + // + // Possible values: + // "WARNING_UNSPECIFIED" - Default type. + // "UNSUPPORTED_MACHINE_TYPE" - The UmN uses an machine type that's + // unsupported in WbI. It will be migrated with the default machine type + // n2-standard-4. Users can change the machine type after the migration. + // "UNSUPPORTED_ACCELERATOR_TYPE" - The UmN uses an accelerator type + // that's unsupported in WbI. It will be migrated without an + // accelerator. User can attach an accelerator after the migration. + // "UNSUPPORTED_OS" - The UmN uses an operating system that's + // unsupported in WbI (e.g. Debian 10, Ubuntu). It will be replaced with + // Debian 11 in WbI. + // "NO_REMOVE_DATA_DISK" - This UmN is configured with + // no_remove_data_disk, which is no longer available in WbI. + // "GCS_BACKUP" - This UmN is configured with the Cloud Storage backup + // feature, which is no longer available in WbI. + // "POST_STARTUP_SCRIPT" - This UmN is configured with a post startup + // script. Please optionally provide the `post_startup_script_option` + // for the migration. + Warnings []string `json:"warnings,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Errors") 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. "Errors") 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 *InstanceMigrationEligibility) MarshalJSON() ([]byte, error) { + type NoMethod InstanceMigrationEligibility + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // IsInstanceUpgradeableResponse: Response for checking if a notebook // instance is upgradeable. type IsInstanceUpgradeableResponse struct { @@ -2007,8 +2065,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. 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 @@ -2111,7 +2169,7 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { // 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": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -2120,17 +2178,17 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < 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 - +// "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 < // 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/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // Bindings: Associates a list of `members`, or principals, with a // `role`. Optionally, may specify a `condition` that determines how and @@ -2203,47 +2261,6 @@ func (s *Policy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PreMigrationCheck: PreMigrationCheck checks how feasible a migration -// from UmN is. -type PreMigrationCheck struct { - // Message: Message provides a summary or workaround. - Message string `json:"message,omitempty"` - - // Result: Result returns the result of the check. - // - // Possible values: - // "RESULT_UNSPECIFIED" - Default type. - // "IDENTICAL" - UmN can be migrated to WbI as is minus non-relevant - // parts. - // "PARTIAL" - Part of the UmN won't be ported. The migration might - // default some values. - // "NOT_RECOMMENDED" - UmN has too many unsupported options for a - // migration to WbI. - Result string `json:"result,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Message") 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. "Message") 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 *PreMigrationCheck) MarshalJSON() ([]byte, error) { - type NoMethod PreMigrationCheck - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // RefreshRuntimeTokenInternalRequest: Request for getting a new access // token. type RefreshRuntimeTokenInternalRequest struct { @@ -2593,6 +2610,10 @@ type Runtime struct { // `projects/{project}/locations/{location}/runtimes/{runtimeId}` Name string `json:"name,omitempty"` + // RuntimeMigrationEligibility: Output only. Checks how feasible a + // migration from GmN to WbI is. + RuntimeMigrationEligibility *RuntimeMigrationEligibility `json:"runtimeMigrationEligibility,omitempty"` + // SoftwareConfig: The config settings for software inside the runtime. SoftwareConfig *RuntimeSoftwareConfig `json:"softwareConfig,omitempty"` @@ -2813,6 +2834,65 @@ func (s *RuntimeMetrics) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RuntimeMigrationEligibility: RuntimeMigrationEligibility represents +// the feasibility information of a migration from GmN to WbI. +type RuntimeMigrationEligibility struct { + // Errors: Output only. Certain configurations make the GmN ineligible + // for an automatic migration. A manual migration is required. + // + // Possible values: + // "ERROR_UNSPECIFIED" - Default type. + // "CUSTOM_CONTAINER" - The GmN is configured with custom container(s) + // and cannot be migrated. + Errors []string `json:"errors,omitempty"` + + // Warnings: Output only. Certain configurations will be defaulted + // during the migration. + // + // Possible values: + // "WARNING_UNSPECIFIED" - Default type. + // "UNSUPPORTED_ACCELERATOR_TYPE" - The GmN uses an accelerator type + // that's unsupported in WbI. It will be migrated without an + // accelerator. Users can attach an accelerator after the migration. + // "UNSUPPORTED_OS" - The GmN uses an operating system that's + // unsupported in WbI (e.g. Debian 10). It will be replaced with Debian + // 11 in WbI. + // "RESERVED_IP_RANGE" - This GmN is configured with reserved IP + // range, which is no longer applicable in WbI. + // "GOOGLE_MANAGED_NETWORK" - This GmN is configured with a Google + // managed network. Please provide the `network` and `subnet` options + // for the migration. + // "POST_STARTUP_SCRIPT" - This GmN is configured with a post startup + // script. Please optionally provide the `post_startup_script_option` + // for the migration. + // "SINGLE_USER" - This GmN is configured with single user mode. + // Please optionally provide the `service_account` option for the + // migration. + Warnings []string `json:"warnings,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Errors") 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. "Errors") 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 *RuntimeMigrationEligibility) MarshalJSON() ([]byte, error) { + type NoMethod RuntimeMigrationEligibility + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RuntimeShieldedInstanceConfig: A set of Shielded Instance options. // See Images using supported Shielded VM features // (https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). @@ -3136,6 +3216,7 @@ type SetInstanceAcceleratorRequest struct { // "NVIDIA_TESLA_P4" - Accelerator type is Nvidia Tesla P4. // "NVIDIA_TESLA_T4" - Accelerator type is Nvidia Tesla T4. // "NVIDIA_TESLA_A100" - Accelerator type is Nvidia Tesla A100. + // "NVIDIA_L4" - Accelerator type is Nvidia Tesla L4. // "NVIDIA_TESLA_T4_VWS" - Accelerator type is NVIDIA Tesla T4 Virtual // Workstations. // "NVIDIA_TESLA_P100_VWS" - Accelerator type is NVIDIA Tesla P100 @@ -6781,6 +6862,19 @@ func (r *ProjectsLocationsInstancesService) List(parent string) *ProjectsLocatio return c } +// Filter sets the optional parameter "filter": List filter. +func (c *ProjectsLocationsInstancesListCall) Filter(filter string) *ProjectsLocationsInstancesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort results. +// Supported values are "name", "name desc" or "" (unsorted). +func (c *ProjectsLocationsInstancesListCall) OrderBy(orderBy string) *ProjectsLocationsInstancesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": Maximum return size // of the list call. func (c *ProjectsLocationsInstancesListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesListCall { @@ -6903,6 +6997,16 @@ func (c *ProjectsLocationsInstancesListCall) Do(opts ...googleapi.CallOption) (* // "parent" // ], // "parameters": { + // "filter": { + // "description": "Optional. List filter.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).", + // "location": "query", + // "type": "string" + // }, // "pageSize": { // "description": "Maximum return size of the list call.", // "format": "int32", @@ -10843,6 +10947,19 @@ func (r *ProjectsLocationsRuntimesService) List(parent string) *ProjectsLocation return c } +// Filter sets the optional parameter "filter": List filter. +func (c *ProjectsLocationsRuntimesListCall) Filter(filter string) *ProjectsLocationsRuntimesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort results. +// Supported values are "name", "name desc" or "" (unsorted). +func (c *ProjectsLocationsRuntimesListCall) OrderBy(orderBy string) *ProjectsLocationsRuntimesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": Maximum return size // of the list call. func (c *ProjectsLocationsRuntimesListCall) PageSize(pageSize int64) *ProjectsLocationsRuntimesListCall { @@ -10965,6 +11082,16 @@ func (c *ProjectsLocationsRuntimesListCall) Do(opts ...googleapi.CallOption) (*L // "parent" // ], // "parameters": { + // "filter": { + // "description": "Optional. List filter.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).", + // "location": "query", + // "type": "string" + // }, // "pageSize": { // "description": "Maximum return size of the list call.", // "format": "int32", diff --git a/notebooks/v2/notebooks-api.json b/notebooks/v2/notebooks-api.json index b309a67b385..27a9de3779d 100644 --- a/notebooks/v2/notebooks-api.json +++ b/notebooks/v2/notebooks-api.json @@ -365,6 +365,16 @@ "parent" ], "parameters": { + "filter": { + "description": "Optional. List filter.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).", + "location": "query", + "type": "string" + }, "pageSize": { "description": "Optional. Maximum return size of the list call.", "format": "int32", @@ -813,7 +823,7 @@ } } }, - "revision": "20230720", + "revision": "20230906", "rootUrl": "https://notebooks.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -1507,7 +1517,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "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`.", + "description": "The normal, successful response of the operation. 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" } }, @@ -1555,7 +1565,7 @@ "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/).", + "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", "properties": { "bindings": { diff --git a/notebooks/v2/notebooks-gen.go b/notebooks/v2/notebooks-gen.go index 67ed5b53f64..38125b186c8 100644 --- a/notebooks/v2/notebooks-gen.go +++ b/notebooks/v2/notebooks-gen.go @@ -1207,8 +1207,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. 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 @@ -1311,7 +1311,7 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { // 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": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -1320,17 +1320,17 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < 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 - +// "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 < // 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/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // Bindings: Associates a list of `members`, or principals, with a // `role`. Optionally, may specify a `condition` that determines how and @@ -3142,6 +3142,19 @@ func (r *ProjectsLocationsInstancesService) List(parent string) *ProjectsLocatio return c } +// Filter sets the optional parameter "filter": List filter. +func (c *ProjectsLocationsInstancesListCall) Filter(filter string) *ProjectsLocationsInstancesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort results. +// Supported values are "name", "name desc" or "" (unsorted). +func (c *ProjectsLocationsInstancesListCall) OrderBy(orderBy string) *ProjectsLocationsInstancesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": Maximum return size // of the list call. func (c *ProjectsLocationsInstancesListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesListCall { @@ -3264,6 +3277,16 @@ func (c *ProjectsLocationsInstancesListCall) Do(opts ...googleapi.CallOption) (* // "parent" // ], // "parameters": { + // "filter": { + // "description": "Optional. List filter.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).", + // "location": "query", + // "type": "string" + // }, // "pageSize": { // "description": "Optional. Maximum return size of the list call.", // "format": "int32",