From 0c82427738cda79e331d5cf418bb24dc9235a32f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 2 Oct 2023 00:24:13 -0700 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2195) --- apigeeregistry/v1/apigeeregistry-api.json | 93 +- apigeeregistry/v1/apigeeregistry-gen.go | 484 + .../v2/baremetalsolution-api.json | 31 +- baremetalsolution/v2/baremetalsolution-gen.go | 158 +- container/v1beta1/container-api.json | 66 +- container/v1beta1/container-gen.go | 127 +- gkeonprem/v1/gkeonprem-api.json | 6 +- gkeonprem/v1/gkeonprem-gen.go | 3 - .../v1beta1/networksecurity-api.json | 14 +- .../v1beta1/networksecurity-gen.go | 24 +- networkservices/v1/networkservices-api.json | 34 +- networkservices/v1/networkservices-gen.go | 82 + .../v1beta1/networkservices-api.json | 661 +- .../v1beta1/networkservices-gen.go | 2351 ++- redis/v1/redis-api.json | 509 +- redis/v1/redis-gen.go | 1546 +- spanner/v1/spanner-api.json | 6 +- spanner/v1/spanner-gen.go | 26 +- vmwareengine/v1/vmwareengine-api.json | 3400 +++++ vmwareengine/v1/vmwareengine-gen.go | 11977 ++++++++++++++++ 20 files changed, 21459 insertions(+), 139 deletions(-) create mode 100644 vmwareengine/v1/vmwareengine-api.json create mode 100644 vmwareengine/v1/vmwareengine-gen.go diff --git a/apigeeregistry/v1/apigeeregistry-api.json b/apigeeregistry/v1/apigeeregistry-api.json index dbb984bebbc..9cb7263de90 100644 --- a/apigeeregistry/v1/apigeeregistry-api.json +++ b/apigeeregistry/v1/apigeeregistry-api.json @@ -2788,6 +2788,97 @@ } } }, + "documents": { + "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/projects/{projectsId}/locations/{locationsId}/documents:getIamPolicy", + "httpMethod": "GET", + "id": "apigeeregistry.projects.locations.documents.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": "^projects/[^/]+/locations/[^/]+/documents$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "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/projects/{projectsId}/locations/{locationsId}/documents:setIamPolicy", + "httpMethod": "POST", + "id": "apigeeregistry.projects.locations.documents.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/[^/]+/locations/[^/]+/documents$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "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/projects/{projectsId}/locations/{locationsId}/documents:testIamPermissions", + "httpMethod": "POST", + "id": "apigeeregistry.projects.locations.documents.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/[^/]+/locations/[^/]+/documents$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "instances": { "methods": { "create": { @@ -3181,7 +3272,7 @@ } } }, - "revision": "20230802", + "revision": "20230928", "rootUrl": "https://apigeeregistry.googleapis.com/", "schemas": { "Api": { diff --git a/apigeeregistry/v1/apigeeregistry-gen.go b/apigeeregistry/v1/apigeeregistry-gen.go index 5a2bf002682..f048287bee1 100644 --- a/apigeeregistry/v1/apigeeregistry-gen.go +++ b/apigeeregistry/v1/apigeeregistry-gen.go @@ -167,6 +167,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Apis = NewProjectsLocationsApisService(s) rs.Artifacts = NewProjectsLocationsArtifactsService(s) + rs.Documents = NewProjectsLocationsDocumentsService(s) rs.Instances = NewProjectsLocationsInstancesService(s) rs.Operations = NewProjectsLocationsOperationsService(s) rs.Runtime = NewProjectsLocationsRuntimeService(s) @@ -180,6 +181,8 @@ type ProjectsLocationsService struct { Artifacts *ProjectsLocationsArtifactsService + Documents *ProjectsLocationsDocumentsService + Instances *ProjectsLocationsInstancesService Operations *ProjectsLocationsOperationsService @@ -289,6 +292,15 @@ type ProjectsLocationsArtifactsService struct { s *Service } +func NewProjectsLocationsDocumentsService(s *Service) *ProjectsLocationsDocumentsService { + rs := &ProjectsLocationsDocumentsService{s: s} + return rs +} + +type ProjectsLocationsDocumentsService struct { + s *Service +} + func NewProjectsLocationsInstancesService(s *Service) *ProjectsLocationsInstancesService { rs := &ProjectsLocationsInstancesService{s: s} return rs @@ -15674,6 +15686,478 @@ func (c *ProjectsLocationsArtifactsTestIamPermissionsCall) Do(opts ...googleapi. } +// method id "apigeeregistry.projects.locations.documents.getIamPolicy": + +type ProjectsLocationsDocumentsGetIamPolicyCall 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 *ProjectsLocationsDocumentsService) GetIamPolicy(resource string) *ProjectsLocationsDocumentsGetIamPolicyCall { + c := &ProjectsLocationsDocumentsGetIamPolicyCall{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 *ProjectsLocationsDocumentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDocumentsGetIamPolicyCall { + 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 *ProjectsLocationsDocumentsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentsGetIamPolicyCall { + 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 *ProjectsLocationsDocumentsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDocumentsGetIamPolicyCall { + 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 *ProjectsLocationsDocumentsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDocumentsGetIamPolicyCall { + 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 *ProjectsLocationsDocumentsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDocumentsGetIamPolicyCall) 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 "apigeeregistry.projects.locations.documents.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 *ProjectsLocationsDocumentsGetIamPolicyCall) 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 resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/documents:getIamPolicy", + // "httpMethod": "GET", + // "id": "apigeeregistry.projects.locations.documents.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": "^projects/[^/]+/locations/[^/]+/documents$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigeeregistry.projects.locations.documents.setIamPolicy": + +type ProjectsLocationsDocumentsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + 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 *ProjectsLocationsDocumentsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDocumentsSetIamPolicyCall { + c := &ProjectsLocationsDocumentsSetIamPolicyCall{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 *ProjectsLocationsDocumentsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentsSetIamPolicyCall { + 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 *ProjectsLocationsDocumentsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDocumentsSetIamPolicyCall { + 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 *ProjectsLocationsDocumentsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDocumentsSetIamPolicyCall) 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, "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 "apigeeregistry.projects.locations.documents.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 *ProjectsLocationsDocumentsSetIamPolicyCall) 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 the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/documents:setIamPolicy", + // "httpMethod": "POST", + // "id": "apigeeregistry.projects.locations.documents.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/[^/]+/locations/[^/]+/documents$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "apigeeregistry.projects.locations.documents.testIamPermissions": + +type ProjectsLocationsDocumentsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + 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 *ProjectsLocationsDocumentsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDocumentsTestIamPermissionsCall { + c := &ProjectsLocationsDocumentsTestIamPermissionsCall{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 *ProjectsLocationsDocumentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentsTestIamPermissionsCall { + 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 *ProjectsLocationsDocumentsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDocumentsTestIamPermissionsCall { + 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 *ProjectsLocationsDocumentsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDocumentsTestIamPermissionsCall) 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, "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 "apigeeregistry.projects.locations.documents.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 *ProjectsLocationsDocumentsTestIamPermissionsCall) 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 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/projects/{projectsId}/locations/{locationsId}/documents:testIamPermissions", + // "httpMethod": "POST", + // "id": "apigeeregistry.projects.locations.documents.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/[^/]+/locations/[^/]+/documents$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "apigeeregistry.projects.locations.instances.create": type ProjectsLocationsInstancesCreateCall struct { diff --git a/baremetalsolution/v2/baremetalsolution-api.json b/baremetalsolution/v2/baremetalsolution-api.json index 3847298b70e..59883414c28 100644 --- a/baremetalsolution/v2/baremetalsolution-api.json +++ b/baremetalsolution/v2/baremetalsolution-api.json @@ -345,7 +345,7 @@ "type": "string" }, "updateMask": { - "description": "The list of fields to update. The currently supported fields are: `labels` `hyperthreading_enabled` `os_image`", + "description": "The list of fields to update. The currently supported fields are: `labels` `hyperthreading_enabled` `os_image` `ssh_keys`", "format": "google-fieldmask", "location": "query", "type": "string" @@ -849,6 +849,31 @@ }, "osImages": { "methods": { + "get": { + "description": "Get details of a single OS image.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/osImages/{osImagesId}", + "httpMethod": "GET", + "id": "baremetalsolution.projects.locations.osImages.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the OS image.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/osImages/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "OSImage" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Retrieves the list of OS images which are currently approved.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/osImages", @@ -870,7 +895,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent value for ListProvisioningQuotasRequest.", + "description": "Required. Parent value for ListOSImagesRequest.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -1588,7 +1613,7 @@ } } }, - "revision": "20230831", + "revision": "20230927", "rootUrl": "https://baremetalsolution.googleapis.com/", "schemas": { "AllowedClient": { diff --git a/baremetalsolution/v2/baremetalsolution-gen.go b/baremetalsolution/v2/baremetalsolution-gen.go index c74e0c6b6ab..bede29ceb4b 100644 --- a/baremetalsolution/v2/baremetalsolution-gen.go +++ b/baremetalsolution/v2/baremetalsolution-gen.go @@ -1917,6 +1917,10 @@ type OSImage struct { // this OS Image. SupportedNetworkTemplates []string `json:"supportedNetworkTemplates,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. // "ApplicableInstanceTypes") to unconditionally include in API // requests. By default, fields with empty or default values are omitted @@ -4171,7 +4175,7 @@ func (r *ProjectsLocationsInstancesService) Patch(name string, instance *Instanc // UpdateMask sets the optional parameter "updateMask": The list of // fields to update. The currently supported fields are: `labels` -// `hyperthreading_enabled` `os_image` +// `hyperthreading_enabled` `os_image` `ssh_keys` func (c *ProjectsLocationsInstancesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInstancesPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -4284,7 +4288,7 @@ func (c *ProjectsLocationsInstancesPatchCall) Do(opts ...googleapi.CallOption) ( // "type": "string" // }, // "updateMask": { - // "description": "The list of fields to update. The currently supported fields are: `labels` `hyperthreading_enabled` `os_image`", + // "description": "The list of fields to update. The currently supported fields are: `labels` `hyperthreading_enabled` `os_image` `ssh_keys`", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -6746,6 +6750,152 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } +// method id "baremetalsolution.projects.locations.osImages.get": + +type ProjectsLocationsOsImagesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get details of a single OS image. +// +// - name: Name of the OS image. +func (r *ProjectsLocationsOsImagesService) Get(name string) *ProjectsLocationsOsImagesGetCall { + c := &ProjectsLocationsOsImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + 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 *ProjectsLocationsOsImagesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOsImagesGetCall { + 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 *ProjectsLocationsOsImagesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOsImagesGetCall { + 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 *ProjectsLocationsOsImagesGetCall) Context(ctx context.Context) *ProjectsLocationsOsImagesGetCall { + 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 *ProjectsLocationsOsImagesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOsImagesGetCall) 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, "v2/{+name}") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "baremetalsolution.projects.locations.osImages.get" call. +// Exactly one of *OSImage or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *OSImage.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 *ProjectsLocationsOsImagesGetCall) Do(opts ...googleapi.CallOption) (*OSImage, 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 := &OSImage{ + 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": "Get details of a single OS image.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/osImages/{osImagesId}", + // "httpMethod": "GET", + // "id": "baremetalsolution.projects.locations.osImages.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the OS image.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/osImages/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "OSImage" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "baremetalsolution.projects.locations.osImages.list": type ProjectsLocationsOsImagesListCall struct { @@ -6759,7 +6909,7 @@ type ProjectsLocationsOsImagesListCall struct { // List: Retrieves the list of OS images which are currently approved. // -// - parent: Parent value for ListProvisioningQuotasRequest. +// - parent: Parent value for ListOSImagesRequest. func (r *ProjectsLocationsOsImagesService) List(parent string) *ProjectsLocationsOsImagesListCall { c := &ProjectsLocationsOsImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -6902,7 +7052,7 @@ func (c *ProjectsLocationsOsImagesListCall) Do(opts ...googleapi.CallOption) (*L // "type": "string" // }, // "parent": { - // "description": "Required. Parent value for ListProvisioningQuotasRequest.", + // "description": "Required. Parent value for ListOSImagesRequest.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, diff --git a/container/v1beta1/container-api.json b/container/v1beta1/container-api.json index cba2626b6e7..f5fd2a3e327 100644 --- a/container/v1beta1/container-api.json +++ b/container/v1beta1/container-api.json @@ -2565,7 +2565,7 @@ } } }, - "revision": "20230914", + "revision": "20230919", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -3020,6 +3020,7 @@ "UPDATE_STARTED", "CREATING_GREEN_POOL", "CORDONING_BLUE_POOL", + "WAITING_TO_DRAIN_BLUE_POOL", "DRAINING_BLUE_POOL", "NODE_POOL_SOAKING", "DELETING_BLUE_POOL", @@ -3030,6 +3031,7 @@ "blue-green upgrade has been initiated.", "Start creating green pool nodes.", "Start cordoning blue pool nodes.", + "Start waiting after cordoning the blue pool and before draining it.", "Start draining blue pool nodes.", "Start soaking time after draining entire blue pool.", "Start deleting blue nodes.", @@ -3393,6 +3395,10 @@ "$ref": "NotificationConfig", "description": "Notification configuration of the cluster." }, + "parentProductConfig": { + "$ref": "ParentProductConfig", + "description": "The configuration of the parent product of the cluster. This field is used by Google internal products that are built on top of the GKE cluster and take the ownership of the cluster." + }, "podSecurityPolicyConfig": { "$ref": "PodSecurityPolicyConfig", "description": "Configuration for the PodSecurityPolicy feature." @@ -3684,6 +3690,20 @@ "description": "The desired image type for the node pool. NOTE: Set the \"desired_node_pool\" field as well.", "type": "string" }, + "desiredInTransitEncryptionConfig": { + "description": "Specify the details of in-transit encryption.", + "enum": [ + "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED", + "IN_TRANSIT_ENCRYPTION_DISABLED", + "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT" + ], + "enumDescriptions": [ + "Unspecified, will be inferred as default - IN_TRANSIT_ENCRYPTION_UNSPECIFIED.", + "In-transit encryption is disabled.", + "Data in-transit is encrypted using inter-node transparent encryption." + ], + "type": "string" + }, "desiredIntraNodeVisibilityConfig": { "$ref": "IntraNodeVisibilityConfig", "description": "The desired config of Intra-node visibility." @@ -3763,6 +3783,10 @@ "$ref": "NotificationConfig", "description": "The desired notification configuration." }, + "desiredParentProductConfig": { + "$ref": "ParentProductConfig", + "description": "The desired parent product config for the cluster." + }, "desiredPodSecurityPolicyConfig": { "$ref": "PodSecurityPolicyConfig", "description": "The desired configuration options for the PodSecurityPolicy feature." @@ -4128,7 +4152,7 @@ "id": "EphemeralStorageConfig", "properties": { "localSsdCount": { - "description": "Number of local SSDs to use to back ephemeral storage. Uses NVMe interfaces. Each local SSD is 375 GB in size. If zero, it means to disable using local SSDs as ephemeral storage.", + "description": "Number of local SSDs to use to back ephemeral storage. Uses NVMe interfaces. The limit for this value is dependent upon the maximum number of disk available on a machine per zone. See: https://cloud.google.com/compute/docs/disks/local-ssd for more information. A zero (or unset) value has different meanings depending on machine type being used: 1. For pre-Gen3 machines, which support flexible numbers of local ssds, zero (or unset) means to disable using local SSDs as ephemeral storage. 2. For Gen3 machines which dictate a specific number of local ssds, zero (or unset) means to use the default number of local ssds that goes with that machine type. For example, for a c3-standard-8-lssd machine, 2 local ssds would be provisioned. For c3-standard-8 (which doesn't support local ssds), 0 will be provisioned. See https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds for more info.", "format": "int32", "type": "integer" } @@ -4140,7 +4164,7 @@ "id": "EphemeralStorageLocalSsdConfig", "properties": { "localSsdCount": { - "description": "Number of local SSDs to use to back ephemeral storage. Uses NVMe interfaces. Each local SSD is 375 GB in size. If zero, it means to disable using local SSDs as ephemeral storage. The limit for this value is dependent upon the maximum number of disks available on a machine per zone. See: https://cloud.google.com/compute/docs/disks/local-ssd for more information.", + "description": "Number of local SSDs to use to back ephemeral storage. Uses NVMe interfaces. A zero (or unset) value has different meanings depending on machine type being used: 1. For pre-Gen3 machines, which support flexible numbers of local ssds, zero (or unset) means to disable using local SSDs as ephemeral storage. The limit for this value is dependent upon the maximum number of disk available on a machine per zone. See: https://cloud.google.com/compute/docs/disks/local-ssd for more information. 2. For Gen3 machines which dictate a specific number of local ssds, zero (or unset) means to use the default number of local ssds that goes with that machine type. For example, for a c3-standard-8-lssd machine, 2 local ssds would be provisioned. For c3-standard-8 (which doesn't support local ssds), 0 will be provisioned. See https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds for more info.", "format": "int32", "type": "integer" } @@ -4259,13 +4283,11 @@ "enum": [ "CHANNEL_UNSPECIFIED", "CHANNEL_DISABLED", - "CHANNEL_EXPERIMENTAL", "CHANNEL_STANDARD" ], "enumDescriptions": [ "Default value.", "Gateway API support is disabled", - "Gateway API support is enabled, experimental CRDs are installed", "Gateway API support is enabled, standard CRDs are installed" ], "type": "string" @@ -4856,7 +4878,7 @@ "id": "LocalNvmeSsdBlockConfig", "properties": { "localSsdCount": { - "description": "The number of raw-block local NVMe SSD disks to be attached to the node. Each local SSD is 375 GB in size. If zero, it means no raw-block local NVMe SSD disks to be attached to the node. The limit for this value is dependent upon the maximum number of disks available on a machine per zone. See: https://cloud.google.com/compute/docs/disks/local-ssd for more information.", + "description": "Number of local NVMe SSDs to use. The limit for this value is dependent upon the maximum number of disk available on a machine per zone. See: https://cloud.google.com/compute/docs/disks/local-ssd for more information. A zero (or unset) value has different meanings depending on machine type being used: 1. For pre-Gen3 machines, which support flexible numbers of local ssds, zero (or unset) means to disable using local SSDs as ephemeral storage. 2. For Gen3 machines which dictate a specific number of local ssds, zero (or unset) means to use the default number of local ssds that goes with that machine type. For example, for a c3-standard-8-lssd machine, 2 local ssds would be provisioned. For c3-standard-8 (which doesn't support local ssds), 0 will be provisioned. See https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds for more info.", "format": "int32", "type": "integer" } @@ -5252,6 +5274,20 @@ "$ref": "GatewayAPIConfig", "description": "GatewayAPIConfig contains the desired config of Gateway API on this cluster." }, + "inTransitEncryptionConfig": { + "description": "Specify the details of in-transit encryption.", + "enum": [ + "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED", + "IN_TRANSIT_ENCRYPTION_DISABLED", + "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT" + ], + "enumDescriptions": [ + "Unspecified, will be inferred as default - IN_TRANSIT_ENCRYPTION_UNSPECIFIED.", + "In-transit encryption is disabled.", + "Data in-transit is encrypted using inter-node transparent encryption." + ], + "type": "string" + }, "network": { "description": "Output only. The relative name of the Google Compute Engine network(https://cloud.google.com/compute/docs/networks-and-firewalls#networks) to which the cluster is connected. Example: projects/my-project/global/networks/my-network", "type": "string" @@ -6159,6 +6195,24 @@ }, "type": "object" }, + "ParentProductConfig": { + "description": "ParentProductConfig is the configuration of the parent product of the cluster. This field is used by Google internal products that are built on top of a GKE cluster and take the ownership of the cluster.", + "id": "ParentProductConfig", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels contain the configuration of the parent product.", + "type": "object" + }, + "productName": { + "description": "Name of the parent product associated with the cluster.", + "type": "string" + } + }, + "type": "object" + }, "PlacementPolicy": { "description": "PlacementPolicy defines the placement policy used by the node pool.", "id": "PlacementPolicy", diff --git a/container/v1beta1/container-gen.go b/container/v1beta1/container-gen.go index 4d7f1eac91a..7127d24cc29 100644 --- a/container/v1beta1/container-gen.go +++ b/container/v1beta1/container-gen.go @@ -1045,6 +1045,8 @@ type BlueGreenInfo struct { // "UPDATE_STARTED" - blue-green upgrade has been initiated. // "CREATING_GREEN_POOL" - Start creating green pool nodes. // "CORDONING_BLUE_POOL" - Start cordoning blue pool nodes. + // "WAITING_TO_DRAIN_BLUE_POOL" - Start waiting after cordoning the + // blue pool and before draining it. // "DRAINING_BLUE_POOL" - Start draining blue pool nodes. // "NODE_POOL_SOAKING" - Start soaking time after draining entire blue // pool. @@ -1579,6 +1581,12 @@ type Cluster struct { // NotificationConfig: Notification configuration of the cluster. NotificationConfig *NotificationConfig `json:"notificationConfig,omitempty"` + // ParentProductConfig: The configuration of the parent product of the + // cluster. This field is used by Google internal products that are + // built on top of the GKE cluster and take the ownership of the + // cluster. + ParentProductConfig *ParentProductConfig `json:"parentProductConfig,omitempty"` + // PodSecurityPolicyConfig: Configuration for the PodSecurityPolicy // feature. PodSecurityPolicyConfig *PodSecurityPolicyConfig `json:"podSecurityPolicyConfig,omitempty"` @@ -1935,6 +1943,18 @@ type ClusterUpdate struct { // the "desired_node_pool" field as well. DesiredImageType string `json:"desiredImageType,omitempty"` + // DesiredInTransitEncryptionConfig: Specify the details of in-transit + // encryption. + // + // Possible values: + // "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED" - Unspecified, will be + // inferred as default - IN_TRANSIT_ENCRYPTION_UNSPECIFIED. + // "IN_TRANSIT_ENCRYPTION_DISABLED" - In-transit encryption is + // disabled. + // "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT" - Data in-transit is + // encrypted using inter-node transparent encryption. + DesiredInTransitEncryptionConfig string `json:"desiredInTransitEncryptionConfig,omitempty"` + // DesiredIntraNodeVisibilityConfig: The desired config of Intra-node // visibility. DesiredIntraNodeVisibilityConfig *IntraNodeVisibilityConfig `json:"desiredIntraNodeVisibilityConfig,omitempty"` @@ -2042,6 +2062,10 @@ type ClusterUpdate struct { // DesiredNotificationConfig: The desired notification configuration. DesiredNotificationConfig *NotificationConfig `json:"desiredNotificationConfig,omitempty"` + // DesiredParentProductConfig: The desired parent product config for the + // cluster. + DesiredParentProductConfig *ParentProductConfig `json:"desiredParentProductConfig,omitempty"` + // DesiredPodSecurityPolicyConfig: The desired configuration options for // the PodSecurityPolicy feature. DesiredPodSecurityPolicyConfig *PodSecurityPolicyConfig `json:"desiredPodSecurityPolicyConfig,omitempty"` @@ -2669,8 +2693,20 @@ type Empty struct { // for the ephemeral storage filesystem. type EphemeralStorageConfig struct { // LocalSsdCount: Number of local SSDs to use to back ephemeral storage. - // Uses NVMe interfaces. Each local SSD is 375 GB in size. If zero, it - // means to disable using local SSDs as ephemeral storage. + // Uses NVMe interfaces. The limit for this value is dependent upon the + // maximum number of disk available on a machine per zone. See: + // https://cloud.google.com/compute/docs/disks/local-ssd for more + // information. A zero (or unset) value has different meanings depending + // on machine type being used: 1. For pre-Gen3 machines, which support + // flexible numbers of local ssds, zero (or unset) means to disable + // using local SSDs as ephemeral storage. 2. For Gen3 machines which + // dictate a specific number of local ssds, zero (or unset) means to use + // the default number of local ssds that goes with that machine type. + // For example, for a c3-standard-8-lssd machine, 2 local ssds would be + // provisioned. For c3-standard-8 (which doesn't support local ssds), 0 + // will be provisioned. See + // https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds + // for more info. LocalSsdCount int64 `json:"localSsdCount,omitempty"` // ForceSendFields is a list of field names (e.g. "LocalSsdCount") to @@ -2701,12 +2737,21 @@ func (s *EphemeralStorageConfig) MarshalJSON() ([]byte, error) { // SSDs. type EphemeralStorageLocalSsdConfig struct { // LocalSsdCount: Number of local SSDs to use to back ephemeral storage. - // Uses NVMe interfaces. Each local SSD is 375 GB in size. If zero, it - // means to disable using local SSDs as ephemeral storage. The limit for - // this value is dependent upon the maximum number of disks available on - // a machine per zone. See: + // Uses NVMe interfaces. A zero (or unset) value has different meanings + // depending on machine type being used: 1. For pre-Gen3 machines, which + // support flexible numbers of local ssds, zero (or unset) means to + // disable using local SSDs as ephemeral storage. The limit for this + // value is dependent upon the maximum number of disk available on a + // machine per zone. See: // https://cloud.google.com/compute/docs/disks/local-ssd for more - // information. + // information. 2. For Gen3 machines which dictate a specific number of + // local ssds, zero (or unset) means to use the default number of local + // ssds that goes with that machine type. For example, for a + // c3-standard-8-lssd machine, 2 local ssds would be provisioned. For + // c3-standard-8 (which doesn't support local ssds), 0 will be + // provisioned. See + // https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds + // for more info. LocalSsdCount int64 `json:"localSsdCount,omitempty"` // ForceSendFields is a list of field names (e.g. "LocalSsdCount") to @@ -2922,8 +2967,6 @@ type GatewayAPIConfig struct { // Possible values: // "CHANNEL_UNSPECIFIED" - Default value. // "CHANNEL_DISABLED" - Gateway API support is disabled - // "CHANNEL_EXPERIMENTAL" - Gateway API support is enabled, - // experimental CRDs are installed // "CHANNEL_STANDARD" - Gateway API support is enabled, standard CRDs // are installed Channel string `json:"channel,omitempty"` @@ -4074,13 +4117,21 @@ func (s *ListUsableSubnetworksResponse) MarshalJSON() ([]byte, error) { // LocalNvmeSsdBlockConfig: LocalNvmeSsdBlockConfig contains // configuration for using raw-block local NVMe SSDs type LocalNvmeSsdBlockConfig struct { - // LocalSsdCount: The number of raw-block local NVMe SSD disks to be - // attached to the node. Each local SSD is 375 GB in size. If zero, it - // means no raw-block local NVMe SSD disks to be attached to the node. - // The limit for this value is dependent upon the maximum number of - // disks available on a machine per zone. See: + // LocalSsdCount: Number of local NVMe SSDs to use. The limit for this + // value is dependent upon the maximum number of disk available on a + // machine per zone. See: // https://cloud.google.com/compute/docs/disks/local-ssd for more - // information. + // information. A zero (or unset) value has different meanings depending + // on machine type being used: 1. For pre-Gen3 machines, which support + // flexible numbers of local ssds, zero (or unset) means to disable + // using local SSDs as ephemeral storage. 2. For Gen3 machines which + // dictate a specific number of local ssds, zero (or unset) means to use + // the default number of local ssds that goes with that machine type. + // For example, for a c3-standard-8-lssd machine, 2 local ssds would be + // provisioned. For c3-standard-8 (which doesn't support local ssds), 0 + // will be provisioned. See + // https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds + // for more info. LocalSsdCount int64 `json:"localSsdCount,omitempty"` // ForceSendFields is a list of field names (e.g. "LocalSsdCount") to @@ -4756,6 +4807,18 @@ type NetworkConfig struct { // Gateway API on this cluster. GatewayApiConfig *GatewayAPIConfig `json:"gatewayApiConfig,omitempty"` + // InTransitEncryptionConfig: Specify the details of in-transit + // encryption. + // + // Possible values: + // "IN_TRANSIT_ENCRYPTION_CONFIG_UNSPECIFIED" - Unspecified, will be + // inferred as default - IN_TRANSIT_ENCRYPTION_UNSPECIFIED. + // "IN_TRANSIT_ENCRYPTION_DISABLED" - In-transit encryption is + // disabled. + // "IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT" - Data in-transit is + // encrypted using inter-node transparent encryption. + InTransitEncryptionConfig string `json:"inTransitEncryptionConfig,omitempty"` + // Network: Output only. The relative name of the Google Compute Engine // network(https://cloud.google.com/compute/docs/networks-and-firewalls#n // etworks) to which the cluster is connected. Example: @@ -6140,6 +6203,40 @@ func (s *OperationProgress) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ParentProductConfig: ParentProductConfig is the configuration of the +// parent product of the cluster. This field is used by Google internal +// products that are built on top of a GKE cluster and take the +// ownership of the cluster. +type ParentProductConfig struct { + // Labels: Labels contain the configuration of the parent product. + Labels map[string]string `json:"labels,omitempty"` + + // ProductName: Name of the parent product associated with the cluster. + ProductName string `json:"productName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Labels") 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. "Labels") 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 *ParentProductConfig) MarshalJSON() ([]byte, error) { + type NoMethod ParentProductConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // PlacementPolicy: PlacementPolicy defines the placement policy used by // the node pool. type PlacementPolicy struct { diff --git a/gkeonprem/v1/gkeonprem-api.json b/gkeonprem/v1/gkeonprem-api.json index 25c48dcdf6f..b5ef12d878b 100644 --- a/gkeonprem/v1/gkeonprem-api.json +++ b/gkeonprem/v1/gkeonprem-api.json @@ -2996,7 +2996,7 @@ } } }, - "revision": "20230918", + "revision": "20230925", "rootUrl": "https://gkeonprem.googleapis.com/", "schemas": { "Authorization": { @@ -5260,10 +5260,6 @@ "description": "Current version of the dependency e.g. 1.15.0.", "type": "string" }, - "localName": { - "description": "Local name of the dependency.", - "type": "string" - }, "membership": { "description": "Membership names are formatted as `projects//locations//memberships/`.", "type": "string" diff --git a/gkeonprem/v1/gkeonprem-gen.go b/gkeonprem/v1/gkeonprem-gen.go index 16cdea45e39..83c04fdcc17 100644 --- a/gkeonprem/v1/gkeonprem-gen.go +++ b/gkeonprem/v1/gkeonprem-gen.go @@ -4486,9 +4486,6 @@ type UpgradeDependency struct { // CurrentVersion: Current version of the dependency e.g. 1.15.0. CurrentVersion string `json:"currentVersion,omitempty"` - // LocalName: Local name of the dependency. - LocalName string `json:"localName,omitempty"` - // Membership: Membership names are formatted as // `projects//locations//memberships/`. Membership string `json:"membership,omitempty"` diff --git a/networksecurity/v1beta1/networksecurity-api.json b/networksecurity/v1beta1/networksecurity-api.json index f91556bba89..c7fcc49de26 100644 --- a/networksecurity/v1beta1/networksecurity-api.json +++ b/networksecurity/v1beta1/networksecurity-api.json @@ -842,7 +842,7 @@ ], "parameters": { "name": { - "description": "Immutable. Name of the SecurityProfileGroup resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.", + "description": "Immutable. Identifier. Name of the SecurityProfileGroup resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+/securityProfileGroups/[^/]+$", "required": true, @@ -1004,7 +1004,7 @@ ], "parameters": { "name": { - "description": "Immutable. Name of the SecurityProfile resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfiles/{security_profile}`.", + "description": "Immutable. Identifier. Name of the SecurityProfile resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfiles/{security_profile}`.", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+/securityProfiles/[^/]+$", "required": true, @@ -3162,7 +3162,7 @@ } } }, - "revision": "20230918", + "revision": "20230920", "rootUrl": "https://networksecurity.googleapis.com/", "schemas": { "AddAddressGroupItemsRequest": { @@ -3468,6 +3468,10 @@ "readOnly": true, "type": "string" }, + "description": { + "description": "Optional. Description of the firewall endpoint. Max length 2048 characters.", + "type": "string" + }, "labels": { "additionalProperties": { "type": "string" @@ -4398,7 +4402,7 @@ "type": "object" }, "name": { - "description": "Immutable. Name of the SecurityProfile resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfiles/{security_profile}`.", + "description": "Immutable. Identifier. Name of the SecurityProfile resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfiles/{security_profile}`.", "type": "string" }, "threatPreventionProfile": { @@ -4453,7 +4457,7 @@ "type": "object" }, "name": { - "description": "Immutable. Name of the SecurityProfileGroup resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.", + "description": "Immutable. Identifier. Name of the SecurityProfileGroup resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.", "type": "string" }, "threatPreventionProfile": { diff --git a/networksecurity/v1beta1/networksecurity-gen.go b/networksecurity/v1beta1/networksecurity-gen.go index e738eb367b1..f97ffb31339 100644 --- a/networksecurity/v1beta1/networksecurity-gen.go +++ b/networksecurity/v1beta1/networksecurity-gen.go @@ -836,6 +836,10 @@ type FirewallEndpoint struct { // CreateTime: Output only. Create time stamp CreateTime string `json:"createTime,omitempty"` + // Description: Optional. Description of the firewall endpoint. Max + // length 2048 characters. + Description string `json:"description,omitempty"` + // Labels: Optional. Labels as key value pairs Labels map[string]string `json:"labels,omitempty"` @@ -2544,8 +2548,8 @@ type SecurityProfile struct { // Labels: Optional. Labels as key value pairs. Labels map[string]string `json:"labels,omitempty"` - // Name: Immutable. Name of the SecurityProfile resource. It matches - // pattern + // Name: Immutable. Identifier. Name of the SecurityProfile resource. It + // matches pattern // `projects|organizations/*/locations/{location}/securityProfiles/{secur // ity_profile}`. Name string `json:"name,omitempty"` @@ -2611,8 +2615,8 @@ type SecurityProfileGroup struct { // Labels: Optional. Labels as key value pairs. Labels map[string]string `json:"labels,omitempty"` - // Name: Immutable. Name of the SecurityProfileGroup resource. It - // matches pattern + // Name: Immutable. Identifier. Name of the SecurityProfileGroup + // resource. It matches pattern // `projects|organizations/*/locations/{location}/securityProfileGroups/{ // security_profile_group}`. Name string `json:"name,omitempty"` @@ -6874,8 +6878,8 @@ type OrganizationsLocationsSecurityProfileGroupsPatchCall struct { // Patch: Updates the parameters of a single SecurityProfileGroup. // -// - name: Immutable. Name of the SecurityProfileGroup resource. It -// matches pattern +// - name: Immutable. Identifier. Name of the SecurityProfileGroup +// resource. It matches pattern // `projects|organizations/*/locations/{location}/securityProfileGroups // /{security_profile_group}`. func (r *OrganizationsLocationsSecurityProfileGroupsService) Patch(name string, securityprofilegroup *SecurityProfileGroup) *OrganizationsLocationsSecurityProfileGroupsPatchCall { @@ -6995,7 +6999,7 @@ func (c *OrganizationsLocationsSecurityProfileGroupsPatchCall) Do(opts ...google // ], // "parameters": { // "name": { - // "description": "Immutable. Name of the SecurityProfileGroup resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.", + // "description": "Immutable. Identifier. Name of the SecurityProfileGroup resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.", // "location": "path", // "pattern": "^organizations/[^/]+/locations/[^/]+/securityProfileGroups/[^/]+$", // "required": true, @@ -7685,8 +7689,8 @@ type OrganizationsLocationsSecurityProfilesPatchCall struct { // Patch: Updates the parameters of a single SecurityProfile. // -// - name: Immutable. Name of the SecurityProfile resource. It matches -// pattern +// - name: Immutable. Identifier. Name of the SecurityProfile resource. +// It matches pattern // `projects|organizations/*/locations/{location}/securityProfiles/{sec // urity_profile}`. func (r *OrganizationsLocationsSecurityProfilesService) Patch(name string, securityprofile *SecurityProfile) *OrganizationsLocationsSecurityProfilesPatchCall { @@ -7806,7 +7810,7 @@ func (c *OrganizationsLocationsSecurityProfilesPatchCall) Do(opts ...googleapi.C // ], // "parameters": { // "name": { - // "description": "Immutable. Name of the SecurityProfile resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfiles/{security_profile}`.", + // "description": "Immutable. Identifier. Name of the SecurityProfile resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfiles/{security_profile}`.", // "location": "path", // "pattern": "^organizations/[^/]+/locations/[^/]+/securityProfiles/[^/]+$", // "required": true, diff --git a/networkservices/v1/networkservices-api.json b/networkservices/v1/networkservices-api.json index b6fc1edac01..000cafbd18a 100644 --- a/networkservices/v1/networkservices-api.json +++ b/networkservices/v1/networkservices-api.json @@ -2148,7 +2148,7 @@ } } }, - "revision": "20230814", + "revision": "20230926", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -2705,6 +2705,10 @@ "$ref": "GrpcRouteRetryPolicy", "description": "Optional. Specifies the retry policy associated with this route." }, + "statefulSessionAffinity": { + "$ref": "GrpcRouteStatefulSessionAffinityPolicy", + "description": "Optional. Specifies cookie-based stateful session affinity." + }, "timeout": { "description": "Optional. Specifies the timeout for selected route. Timeout is computed from the time the request has been fully processed (i.e. end of stream) up until the response has been completely processed. Timeout includes all retries.", "format": "google-duration", @@ -2749,6 +2753,18 @@ }, "type": "object" }, + "GrpcRouteStatefulSessionAffinityPolicy": { + "description": "The specification for cookie-based stateful session affinity where the date plane supplies a “session cookie” with the name \"GSSA\" which encodes a specific destination host and each request containing that cookie will be directed to that host as long as the destination host remains up and healthy. The gRPC proxyless mesh library or sidecar proxy will manage the session cookie but the client application code is responsible for copying the cookie from each RPC in the session to the next.", + "id": "GrpcRouteStatefulSessionAffinityPolicy", + "properties": { + "cookieTtl": { + "description": "Required. The cookie TTL value for the Set-Cookie header generated by the data plane. The lifetime of the cookie may be set to a value from 1 to 86400 seconds (24 hours) inclusive.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, "HttpRoute": { "description": "HttpRoute is the resource defining how HTTP traffic should be routed by a Mesh or Gateway resource.", "id": "HttpRoute", @@ -3168,6 +3184,10 @@ "$ref": "HttpRouteRetryPolicy", "description": "Specifies the retry policy associated with this route." }, + "statefulSessionAffinity": { + "$ref": "HttpRouteStatefulSessionAffinityPolicy", + "description": "Optional. Specifies cookie-based stateful session affinity." + }, "timeout": { "description": "Specifies the timeout for selected route. Timeout is computed from the time the request has been fully processed (i.e. end of stream) up until the response has been completely processed. Timeout includes all retries.", "format": "google-duration", @@ -3235,6 +3255,18 @@ }, "type": "object" }, + "HttpRouteStatefulSessionAffinityPolicy": { + "description": "The specification for cookie-based stateful session affinity where the date plane supplies a “session cookie” with the name \"GSSA\" which encodes a specific destination host and each request containing that cookie will be directed to that host as long as the destination host remains up and healthy. The gRPC proxyless mesh library or sidecar proxy will manage the session cookie but the client application code is responsible for copying the cookie from each RPC in the session to the next.", + "id": "HttpRouteStatefulSessionAffinityPolicy", + "properties": { + "cookieTtl": { + "description": "Required. The cookie TTL value for the Set-Cookie header generated by the data plane. The lifetime of the cookie may be set to a value from 1 to 86400 seconds (24 hours) inclusive.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, "HttpRouteURLRewrite": { "description": "The specification for modifying the URL of the request, prior to forwarding the request to the destination.", "id": "HttpRouteURLRewrite", diff --git a/networkservices/v1/networkservices-gen.go b/networkservices/v1/networkservices-gen.go index 991c9df485b..fedb6e1e210 100644 --- a/networkservices/v1/networkservices-gen.go +++ b/networkservices/v1/networkservices-gen.go @@ -1302,6 +1302,10 @@ type GrpcRouteRouteAction struct { // this route. RetryPolicy *GrpcRouteRetryPolicy `json:"retryPolicy,omitempty"` + // StatefulSessionAffinity: Optional. Specifies cookie-based stateful + // session affinity. + StatefulSessionAffinity *GrpcRouteStatefulSessionAffinityPolicy `json:"statefulSessionAffinity,omitempty"` + // Timeout: Optional. Specifies the timeout for selected route. Timeout // is computed from the time the request has been fully processed (i.e. // end of stream) up until the response has been completely processed. @@ -1400,6 +1404,43 @@ func (s *GrpcRouteRouteRule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GrpcRouteStatefulSessionAffinityPolicy: The specification for +// cookie-based stateful session affinity where the date plane supplies +// a “session cookie” with the name "GSSA" which encodes a specific +// destination host and each request containing that cookie will be +// directed to that host as long as the destination host remains up and +// healthy. The gRPC proxyless mesh library or sidecar proxy will manage +// the session cookie but the client application code is responsible for +// copying the cookie from each RPC in the session to the next. +type GrpcRouteStatefulSessionAffinityPolicy struct { + // CookieTtl: Required. The cookie TTL value for the Set-Cookie header + // generated by the data plane. The lifetime of the cookie may be set to + // a value from 1 to 86400 seconds (24 hours) inclusive. + CookieTtl string `json:"cookieTtl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CookieTtl") 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. "CookieTtl") 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 *GrpcRouteStatefulSessionAffinityPolicy) MarshalJSON() ([]byte, error) { + type NoMethod GrpcRouteStatefulSessionAffinityPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HttpRoute: HttpRoute is the resource defining how HTTP traffic should // be routed by a Mesh or Gateway resource. type HttpRoute struct { @@ -2074,6 +2115,10 @@ type HttpRouteRouteAction struct { // RetryPolicy: Specifies the retry policy associated with this route. RetryPolicy *HttpRouteRetryPolicy `json:"retryPolicy,omitempty"` + // StatefulSessionAffinity: Optional. Specifies cookie-based stateful + // session affinity. + StatefulSessionAffinity *HttpRouteStatefulSessionAffinityPolicy `json:"statefulSessionAffinity,omitempty"` + // Timeout: Specifies the timeout for selected route. Timeout is // computed from the time the request has been fully processed (i.e. end // of stream) up until the response has been completely processed. @@ -2201,6 +2246,43 @@ func (s *HttpRouteRouteRule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// HttpRouteStatefulSessionAffinityPolicy: The specification for +// cookie-based stateful session affinity where the date plane supplies +// a “session cookie” with the name "GSSA" which encodes a specific +// destination host and each request containing that cookie will be +// directed to that host as long as the destination host remains up and +// healthy. The gRPC proxyless mesh library or sidecar proxy will manage +// the session cookie but the client application code is responsible for +// copying the cookie from each RPC in the session to the next. +type HttpRouteStatefulSessionAffinityPolicy struct { + // CookieTtl: Required. The cookie TTL value for the Set-Cookie header + // generated by the data plane. The lifetime of the cookie may be set to + // a value from 1 to 86400 seconds (24 hours) inclusive. + CookieTtl string `json:"cookieTtl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CookieTtl") 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. "CookieTtl") 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 *HttpRouteStatefulSessionAffinityPolicy) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteStatefulSessionAffinityPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HttpRouteURLRewrite: The specification for modifying the URL of the // request, prior to forwarding the request to the destination. type HttpRouteURLRewrite struct { diff --git a/networkservices/v1beta1/networkservices-api.json b/networkservices/v1beta1/networkservices-api.json index 51d064e7fbd..19624172048 100644 --- a/networkservices/v1beta1/networkservices-api.json +++ b/networkservices/v1beta1/networkservices-api.json @@ -979,6 +979,370 @@ } } }, + "lbRouteExtensions": { + "methods": { + "create": { + "description": "Creates a new `LbRouteExtension` resource in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions", + "httpMethod": "POST", + "id": "networkservices.projects.locations.lbRouteExtensions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "lbRouteExtensionId": { + "description": "Required. User-provided ID of the `LbRouteExtension` resource to be created.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource of the `LbRouteExtension` resource. Must be in the format `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/lbRouteExtensions", + "request": { + "$ref": "LbRouteExtension" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes the specified `LbRouteExtension` resource.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", + "httpMethod": "DELETE", + "id": "networkservices.projects.locations.lbRouteExtensions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the `LbRouteExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of the specified `LbRouteExtension` resource.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", + "httpMethod": "GET", + "id": "networkservices.projects.locations.lbRouteExtensions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the `LbRouteExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "LbRouteExtension" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists `LbRouteExtension` resources in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions", + "httpMethod": "GET", + "id": "networkservices.projects.locations.lbRouteExtensions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. The server might return fewer items than requested. If unspecified, the server picks an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results that the server returns.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the `LbRouteExtension` resources are listed, specified in the following format: `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/lbRouteExtensions", + "response": { + "$ref": "ListLbRouteExtensionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of the specified `LbRouteExtension` resource.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", + "httpMethod": "PATCH", + "id": "networkservices.projects.locations.lbRouteExtensions.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the `LbRouteExtension` resource in the following format: `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Used to specify the fields to be overwritten in the `LbRouteExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "LbRouteExtension" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "lbTrafficExtensions": { + "methods": { + "create": { + "description": "Creates a new `LbTrafficExtension` resource in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions", + "httpMethod": "POST", + "id": "networkservices.projects.locations.lbTrafficExtensions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "lbTrafficExtensionId": { + "description": "Required. User-provided ID of the `LbTrafficExtension` resource to be created.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource of the `LbTrafficExtension` resource. Must be in the format `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/lbTrafficExtensions", + "request": { + "$ref": "LbTrafficExtension" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes the specified `LbTrafficExtension` resource.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", + "httpMethod": "DELETE", + "id": "networkservices.projects.locations.lbTrafficExtensions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the `LbTrafficExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of the specified `LbTrafficExtension` resource.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", + "httpMethod": "GET", + "id": "networkservices.projects.locations.lbTrafficExtensions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the `LbTrafficExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "LbTrafficExtension" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists `LbTrafficExtension` resources in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions", + "httpMethod": "GET", + "id": "networkservices.projects.locations.lbTrafficExtensions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. The server might return fewer items than requested. If unspecified, the server picks an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results that the server returns.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the `LbTrafficExtension` resources are listed, specified in the following format: `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/lbTrafficExtensions", + "response": { + "$ref": "ListLbTrafficExtensionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of the specified `LbTrafficExtension` resource.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", + "httpMethod": "PATCH", + "id": "networkservices.projects.locations.lbTrafficExtensions.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the `LbTrafficExtension` resource in the following format: `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Used to specify the fields to be overwritten in the `LbTrafficExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "LbTrafficExtension" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "meshes": { "methods": { "create": { @@ -2119,7 +2483,7 @@ } } }, - "revision": "20230814", + "revision": "20230926", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -2306,6 +2670,95 @@ }, "type": "object" }, + "ExtensionChain": { + "description": "A single extension chain wrapper that contains the match conditions and extensions to execute.", + "id": "ExtensionChain", + "properties": { + "extensions": { + "description": "Required. A set of extensions to execute for the matching request. At least one extension is required. Up to 3 extensions can be defined for each extension chain for `LbTrafficExtension` resource. `LbRouteExtension` chains are limited to 1 extension per extension chain.", + "items": { + "$ref": "ExtensionChainExtension" + }, + "type": "array" + }, + "matchCondition": { + "$ref": "ExtensionChainMatchCondition", + "description": "Required. Conditions under which this chain is invoked for a request." + }, + "name": { + "description": "Required. The name for this extension chain. The name is logged as part of the HTTP request logs. The name must conform with RFC-1034, is restricted to lower-cased letters, numbers and hyphens, and can have a maximum length of 63 characters. Additionally, the first character must be a letter and the last a letter or a number.", + "type": "string" + } + }, + "type": "object" + }, + "ExtensionChainExtension": { + "description": "A single extension in the chain to execute for the matching request.", + "id": "ExtensionChainExtension", + "properties": { + "authority": { + "description": "Required. The `:authority` header in the gRPC request sent from Envoy to the extension service.", + "type": "string" + }, + "failOpen": { + "description": "Optional. Determines how the proxy behaves if the call to the extension fails or times out. When set to `TRUE`, request or response processing continues without error. Any subsequent extensions in the extension chain are also executed. When set to `FALSE`: * If response headers have not been delivered to the downstream client, a generic 500 error is returned to the client. The error response can be tailored by configuring a custom error response in the load balancer. * If response headers have been delivered, then the HTTP stream to the downstream client is reset. Default is `FALSE`.", + "type": "boolean" + }, + "forwardHeaders": { + "description": "Optional. List of the HTTP headers to forward to the extension (from the client or backend). If omitted, all headers are sent. Each element is a string indicating the header name.", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Required. The name for this extension. The name is logged as part of the HTTP request logs. The name must conform with RFC-1034, is restricted to lower-cased letters, numbers and hyphens, and can have a maximum length of 63 characters. Additionally, the first character must be a letter and the last a letter or a number.", + "type": "string" + }, + "service": { + "description": "Required. The reference to the service that runs the extension. Must be a reference to a [backend service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices).", + "type": "string" + }, + "supportedEvents": { + "description": "Optional. A set of events during request or response processing for which this extension is called. This field is required for the `LbTrafficExtension` resource. It's not relevant for the `LbRouteExtension` resource.", + "items": { + "enum": [ + "EVENT_TYPE_UNSPECIFIED", + "REQUEST_HEADERS", + "REQUEST_BODY", + "RESPONSE_HEADERS", + "RESPONSE_BODY" + ], + "enumDescriptions": [ + "Unspecified value. Do not use.", + "If included in `supported_events`, the extension is called when the HTTP request headers arrive.", + "If included in `supported_events`, the extension is called when the HTTP request body arrives.", + "If included in `supported_events`, the extension is called when the HTTP response headers arrive.", + "If included in `supported_events`, the extension is called when the HTTP response body arrives." + ], + "type": "string" + }, + "type": "array" + }, + "timeout": { + "description": "Required. Specifies the timeout for each individual message on the stream. The timeout must be between 10-1000 milliseconds.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "ExtensionChainMatchCondition": { + "description": "Conditions under which this chain is invoked for a request.", + "id": "ExtensionChainMatchCondition", + "properties": { + "celExpression": { + "description": "Required. A Common Expression Language (CEL) expression that is used to match requests for which the extension chain is executed.", + "type": "string" + } + }, + "type": "object" + }, "Gateway": { "description": "Gateway represents the configuration for a proxy, typically a load balancer. It captures the ip:port over which the services are exposed by the proxy, along with any policy configurations. Routes have reference to to Gateways to dictate how requests should be routed by this Gateway.", "id": "Gateway", @@ -2633,6 +3086,10 @@ "$ref": "GrpcRouteRetryPolicy", "description": "Optional. Specifies the retry policy associated with this route." }, + "statefulSessionAffinity": { + "$ref": "GrpcRouteStatefulSessionAffinityPolicy", + "description": "Optional. Specifies cookie-based stateful session affinity." + }, "timeout": { "description": "Optional. Specifies the timeout for selected route. Timeout is computed from the time the request has been fully processed (i.e. end of stream) up until the response has been completely processed. Timeout includes all retries.", "format": "google-duration", @@ -2677,6 +3134,18 @@ }, "type": "object" }, + "GrpcRouteStatefulSessionAffinityPolicy": { + "description": "The specification for cookie-based stateful session affinity where the date plane supplies a “session cookie” with the name \"GSSA\" which encodes a specific destination host and each request containing that cookie will be directed to that host as long as the destination host remains up and healthy. The gRPC proxyless mesh library or sidecar proxy will manage the session cookie but the client application code is responsible for copying the cookie from each RPC in the session to the next.", + "id": "GrpcRouteStatefulSessionAffinityPolicy", + "properties": { + "cookieTtl": { + "description": "Required. The cookie TTL value for the Set-Cookie header generated by the data plane. The lifetime of the cookie may be set to a value from 1 to 86400 seconds (24 hours) inclusive.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, "HttpRoute": { "description": "HttpRoute is the resource defining how HTTP traffic should be routed by a Mesh or Gateway resource.", "id": "HttpRoute", @@ -3096,6 +3565,10 @@ "$ref": "HttpRouteRetryPolicy", "description": "Specifies the retry policy associated with this route." }, + "statefulSessionAffinity": { + "$ref": "HttpRouteStatefulSessionAffinityPolicy", + "description": "Optional. Specifies cookie-based stateful session affinity." + }, "timeout": { "description": "Specifies the timeout for selected route. Timeout is computed from the time the request has been fully processed (i.e. end of stream) up until the response has been completely processed. Timeout includes all retries.", "format": "google-duration", @@ -3163,6 +3636,18 @@ }, "type": "object" }, + "HttpRouteStatefulSessionAffinityPolicy": { + "description": "The specification for cookie-based stateful session affinity where the date plane supplies a “session cookie” with the name \"GSSA\" which encodes a specific destination host and each request containing that cookie will be directed to that host as long as the destination host remains up and healthy. The gRPC proxyless mesh library or sidecar proxy will manage the session cookie but the client application code is responsible for copying the cookie from each RPC in the session to the next.", + "id": "HttpRouteStatefulSessionAffinityPolicy", + "properties": { + "cookieTtl": { + "description": "Required. The cookie TTL value for the Set-Cookie header generated by the data plane. The lifetime of the cookie may be set to a value from 1 to 86400 seconds (24 hours) inclusive.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, "HttpRouteURLRewrite": { "description": "The specification for modifying the URL of the request, prior to forwarding the request to the destination.", "id": "HttpRouteURLRewrite", @@ -3178,6 +3663,130 @@ }, "type": "object" }, + "LbRouteExtension": { + "description": "`LbRouteExtension` is a resource that lets you control where traffic is routed to for a given request.", + "id": "LbRouteExtension", + "properties": { + "createTime": { + "description": "Output only. The timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. A human-readable description of the resource.", + "type": "string" + }, + "extensionChains": { + "description": "Required. A set of ordered extension chains that contain the match conditions and extensions to execute. Match conditions for each extension chain are evaluated in sequence for a given request. The first extension chain that has a condition that matches the request is executed. Any subsequent extension chains do not execute. Limited to 5 extension chains per resource.", + "items": { + "$ref": "ExtensionChain" + }, + "type": "array" + }, + "forwardingRules": { + "description": "Required. A list of references to the forwarding rules to which this service extension is attach to. At least one forwarding rule is required. There can be only one `LbRouteExtension` resource per forwarding rule.", + "items": { + "type": "string" + }, + "type": "array" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Set of labels associated with the `LbRouteExtension` resource. The format must comply with [the following requirements](/compute/docs/labeling-resources#requirements).", + "type": "object" + }, + "loadBalancingScheme": { + "description": "Required. All backend services and forwarding rules referenced by this extension must share the same load balancing scheme. Supported values: `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`.", + "enum": [ + "LOAD_BALANCING_SCHEME_UNSPECIFIED", + "INTERNAL_MANAGED", + "EXTERNAL_MANAGED" + ], + "enumDescriptions": [ + "Default value. Do not use.", + "Signifies that this is used for Internal HTTP(S) Load Balancing.", + "Signifies that this is used for External Managed HTTP(S) Load Balancing." + ], + "type": "string" + }, + "name": { + "description": "Required. Name of the `LbRouteExtension` resource in the following format: `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "LbTrafficExtension": { + "description": "`LbTrafficExtension` is a resource that lets the extension service modify the headers and payloads of both requests and responses without impacting the choice of backend services or any other security policies associated with the backend service.", + "id": "LbTrafficExtension", + "properties": { + "createTime": { + "description": "Output only. The timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. A human-readable description of the resource.", + "type": "string" + }, + "extensionChains": { + "description": "Required. A set of ordered extension chains that contain the match conditions and extensions to execute. Match conditions for each extension chain are evaluated in sequence for a given request. The first extension chain that has a condition that matches the request is executed. Any subsequent extension chains do not execute. Limited to 5 extension chains per resource.", + "items": { + "$ref": "ExtensionChain" + }, + "type": "array" + }, + "forwardingRules": { + "description": "Required. A list of references to the forwarding rules to which this service extension is attach to. At least one forwarding rule is required. There can be only one `LBTrafficExtension` resource per forwarding rule.", + "items": { + "type": "string" + }, + "type": "array" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Set of labels associated with the `LbTrafficExtension` resource. The format must comply with [the following requirements](/compute/docs/labeling-resources#requirements).", + "type": "object" + }, + "loadBalancingScheme": { + "description": "Required. All backend services and forwarding rules referenced by this extension must share the same load balancing scheme. Supported values: `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to [Choosing a load balancer](https://cloud.google.com/load-balancing/docs/backend-service).", + "enum": [ + "LOAD_BALANCING_SCHEME_UNSPECIFIED", + "INTERNAL_MANAGED", + "EXTERNAL_MANAGED" + ], + "enumDescriptions": [ + "Default value. Do not use.", + "Signifies that this is used for Internal HTTP(S) Load Balancing.", + "Signifies that this is used for External Managed HTTP(S) Load Balancing." + ], + "type": "string" + }, + "name": { + "description": "Required. Name of the `LbTrafficExtension` resource in the following format: `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ListEndpointPoliciesResponse": { "description": "Response returned by the ListEndpointPolicies method.", "id": "ListEndpointPoliciesResponse", @@ -3257,6 +3866,56 @@ }, "type": "object" }, + "ListLbRouteExtensionsResponse": { + "description": "Message for response to listing `LbRouteExtension` resources.", + "id": "ListLbRouteExtensionsResponse", + "properties": { + "lbRouteExtensions": { + "description": "The list of `LbRouteExtension` resources.", + "items": { + "$ref": "LbRouteExtension" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results that the server returns.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListLbTrafficExtensionsResponse": { + "description": "Message for response to listing `LbTrafficExtension` resources.", + "id": "ListLbTrafficExtensionsResponse", + "properties": { + "lbTrafficExtensions": { + "description": "The list of `LbTrafficExtension` resources.", + "items": { + "$ref": "LbTrafficExtension" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results that the server returns.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "ListLocationsResponse", diff --git a/networkservices/v1beta1/networkservices-gen.go b/networkservices/v1beta1/networkservices-gen.go index 948985c245c..7e68164fc34 100644 --- a/networkservices/v1beta1/networkservices-gen.go +++ b/networkservices/v1beta1/networkservices-gen.go @@ -169,6 +169,8 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.Gateways = NewProjectsLocationsGatewaysService(s) rs.GrpcRoutes = NewProjectsLocationsGrpcRoutesService(s) rs.HttpRoutes = NewProjectsLocationsHttpRoutesService(s) + rs.LbRouteExtensions = NewProjectsLocationsLbRouteExtensionsService(s) + rs.LbTrafficExtensions = NewProjectsLocationsLbTrafficExtensionsService(s) rs.Meshes = NewProjectsLocationsMeshesService(s) rs.Operations = NewProjectsLocationsOperationsService(s) rs.ServiceBindings = NewProjectsLocationsServiceBindingsService(s) @@ -189,6 +191,10 @@ type ProjectsLocationsService struct { HttpRoutes *ProjectsLocationsHttpRoutesService + LbRouteExtensions *ProjectsLocationsLbRouteExtensionsService + + LbTrafficExtensions *ProjectsLocationsLbTrafficExtensionsService + Meshes *ProjectsLocationsMeshesService Operations *ProjectsLocationsOperationsService @@ -238,6 +244,24 @@ type ProjectsLocationsHttpRoutesService struct { s *Service } +func NewProjectsLocationsLbRouteExtensionsService(s *Service) *ProjectsLocationsLbRouteExtensionsService { + rs := &ProjectsLocationsLbRouteExtensionsService{s: s} + return rs +} + +type ProjectsLocationsLbRouteExtensionsService struct { + s *Service +} + +func NewProjectsLocationsLbTrafficExtensionsService(s *Service) *ProjectsLocationsLbTrafficExtensionsService { + rs := &ProjectsLocationsLbTrafficExtensionsService{s: s} + return rs +} + +type ProjectsLocationsLbTrafficExtensionsService struct { + s *Service +} + func NewProjectsLocationsMeshesService(s *Service) *ProjectsLocationsMeshesService { rs := &ProjectsLocationsMeshesService{s: s} return rs @@ -672,6 +696,161 @@ func (s *Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ExtensionChain: A single extension chain wrapper that contains the +// match conditions and extensions to execute. +type ExtensionChain struct { + // Extensions: Required. A set of extensions to execute for the matching + // request. At least one extension is required. Up to 3 extensions can + // be defined for each extension chain for `LbTrafficExtension` + // resource. `LbRouteExtension` chains are limited to 1 extension per + // extension chain. + Extensions []*ExtensionChainExtension `json:"extensions,omitempty"` + + // MatchCondition: Required. Conditions under which this chain is + // invoked for a request. + MatchCondition *ExtensionChainMatchCondition `json:"matchCondition,omitempty"` + + // Name: Required. The name for this extension chain. The name is logged + // as part of the HTTP request logs. The name must conform with + // RFC-1034, is restricted to lower-cased letters, numbers and hyphens, + // and can have a maximum length of 63 characters. Additionally, the + // first character must be a letter and the last a letter or a number. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Extensions") 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. "Extensions") 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 *ExtensionChain) MarshalJSON() ([]byte, error) { + type NoMethod ExtensionChain + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ExtensionChainExtension: A single extension in the chain to execute +// for the matching request. +type ExtensionChainExtension struct { + // Authority: Required. The `:authority` header in the gRPC request sent + // from Envoy to the extension service. + Authority string `json:"authority,omitempty"` + + // FailOpen: Optional. Determines how the proxy behaves if the call to + // the extension fails or times out. When set to `TRUE`, request or + // response processing continues without error. Any subsequent + // extensions in the extension chain are also executed. When set to + // `FALSE`: * If response headers have not been delivered to the + // downstream client, a generic 500 error is returned to the client. The + // error response can be tailored by configuring a custom error response + // in the load balancer. * If response headers have been delivered, then + // the HTTP stream to the downstream client is reset. Default is + // `FALSE`. + FailOpen bool `json:"failOpen,omitempty"` + + // ForwardHeaders: Optional. List of the HTTP headers to forward to the + // extension (from the client or backend). If omitted, all headers are + // sent. Each element is a string indicating the header name. + ForwardHeaders []string `json:"forwardHeaders,omitempty"` + + // Name: Required. The name for this extension. The name is logged as + // part of the HTTP request logs. The name must conform with RFC-1034, + // is restricted to lower-cased letters, numbers and hyphens, and can + // have a maximum length of 63 characters. Additionally, the first + // character must be a letter and the last a letter or a number. + Name string `json:"name,omitempty"` + + // Service: Required. The reference to the service that runs the + // extension. Must be a reference to a backend service + // (https://cloud.google.com/compute/docs/reference/rest/v1/backendServices). + Service string `json:"service,omitempty"` + + // SupportedEvents: Optional. A set of events during request or response + // processing for which this extension is called. This field is required + // for the `LbTrafficExtension` resource. It's not relevant for the + // `LbRouteExtension` resource. + // + // Possible values: + // "EVENT_TYPE_UNSPECIFIED" - Unspecified value. Do not use. + // "REQUEST_HEADERS" - If included in `supported_events`, the + // extension is called when the HTTP request headers arrive. + // "REQUEST_BODY" - If included in `supported_events`, the extension + // is called when the HTTP request body arrives. + // "RESPONSE_HEADERS" - If included in `supported_events`, the + // extension is called when the HTTP response headers arrive. + // "RESPONSE_BODY" - If included in `supported_events`, the extension + // is called when the HTTP response body arrives. + SupportedEvents []string `json:"supportedEvents,omitempty"` + + // Timeout: Required. Specifies the timeout for each individual message + // on the stream. The timeout must be between 10-1000 milliseconds. + Timeout string `json:"timeout,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Authority") 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. "Authority") 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 *ExtensionChainExtension) MarshalJSON() ([]byte, error) { + type NoMethod ExtensionChainExtension + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ExtensionChainMatchCondition: Conditions under which this chain is +// invoked for a request. +type ExtensionChainMatchCondition struct { + // CelExpression: Required. A Common Expression Language (CEL) + // expression that is used to match requests for which the extension + // chain is executed. + CelExpression string `json:"celExpression,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CelExpression") 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. "CelExpression") 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 *ExtensionChainMatchCondition) MarshalJSON() ([]byte, error) { + type NoMethod ExtensionChainMatchCondition + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Gateway: Gateway represents the configuration for a proxy, typically // a load balancer. It captures the ip:port over which the services are // exposed by the proxy, along with any policy configurations. Routes @@ -1186,6 +1365,10 @@ type GrpcRouteRouteAction struct { // this route. RetryPolicy *GrpcRouteRetryPolicy `json:"retryPolicy,omitempty"` + // StatefulSessionAffinity: Optional. Specifies cookie-based stateful + // session affinity. + StatefulSessionAffinity *GrpcRouteStatefulSessionAffinityPolicy `json:"statefulSessionAffinity,omitempty"` + // Timeout: Optional. Specifies the timeout for selected route. Timeout // is computed from the time the request has been fully processed (i.e. // end of stream) up until the response has been completely processed. @@ -1284,6 +1467,43 @@ func (s *GrpcRouteRouteRule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GrpcRouteStatefulSessionAffinityPolicy: The specification for +// cookie-based stateful session affinity where the date plane supplies +// a “session cookie” with the name "GSSA" which encodes a specific +// destination host and each request containing that cookie will be +// directed to that host as long as the destination host remains up and +// healthy. The gRPC proxyless mesh library or sidecar proxy will manage +// the session cookie but the client application code is responsible for +// copying the cookie from each RPC in the session to the next. +type GrpcRouteStatefulSessionAffinityPolicy struct { + // CookieTtl: Required. The cookie TTL value for the Set-Cookie header + // generated by the data plane. The lifetime of the cookie may be set to + // a value from 1 to 86400 seconds (24 hours) inclusive. + CookieTtl string `json:"cookieTtl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CookieTtl") 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. "CookieTtl") 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 *GrpcRouteStatefulSessionAffinityPolicy) MarshalJSON() ([]byte, error) { + type NoMethod GrpcRouteStatefulSessionAffinityPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HttpRoute: HttpRoute is the resource defining how HTTP traffic should // be routed by a Mesh or Gateway resource. type HttpRoute struct { @@ -1958,6 +2178,10 @@ type HttpRouteRouteAction struct { // RetryPolicy: Specifies the retry policy associated with this route. RetryPolicy *HttpRouteRetryPolicy `json:"retryPolicy,omitempty"` + // StatefulSessionAffinity: Optional. Specifies cookie-based stateful + // session affinity. + StatefulSessionAffinity *HttpRouteStatefulSessionAffinityPolicy `json:"statefulSessionAffinity,omitempty"` + // Timeout: Specifies the timeout for selected route. Timeout is // computed from the time the request has been fully processed (i.e. end // of stream) up until the response has been completely processed. @@ -2085,6 +2309,43 @@ func (s *HttpRouteRouteRule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// HttpRouteStatefulSessionAffinityPolicy: The specification for +// cookie-based stateful session affinity where the date plane supplies +// a “session cookie” with the name "GSSA" which encodes a specific +// destination host and each request containing that cookie will be +// directed to that host as long as the destination host remains up and +// healthy. The gRPC proxyless mesh library or sidecar proxy will manage +// the session cookie but the client application code is responsible for +// copying the cookie from each RPC in the session to the next. +type HttpRouteStatefulSessionAffinityPolicy struct { + // CookieTtl: Required. The cookie TTL value for the Set-Cookie header + // generated by the data plane. The lifetime of the cookie may be set to + // a value from 1 to 86400 seconds (24 hours) inclusive. + CookieTtl string `json:"cookieTtl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CookieTtl") 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. "CookieTtl") 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 *HttpRouteStatefulSessionAffinityPolicy) MarshalJSON() ([]byte, error) { + type NoMethod HttpRouteStatefulSessionAffinityPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HttpRouteURLRewrite: The specification for modifying the URL of the // request, prior to forwarding the request to the destination. type HttpRouteURLRewrite struct { @@ -2120,6 +2381,164 @@ func (s *HttpRouteURLRewrite) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LbRouteExtension: `LbRouteExtension` is a resource that lets you +// control where traffic is routed to for a given request. +type LbRouteExtension struct { + // CreateTime: Output only. The timestamp when the resource was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. A human-readable description of the resource. + Description string `json:"description,omitempty"` + + // ExtensionChains: Required. A set of ordered extension chains that + // contain the match conditions and extensions to execute. Match + // conditions for each extension chain are evaluated in sequence for a + // given request. The first extension chain that has a condition that + // matches the request is executed. Any subsequent extension chains do + // not execute. Limited to 5 extension chains per resource. + ExtensionChains []*ExtensionChain `json:"extensionChains,omitempty"` + + // ForwardingRules: Required. A list of references to the forwarding + // rules to which this service extension is attach to. At least one + // forwarding rule is required. There can be only one `LbRouteExtension` + // resource per forwarding rule. + ForwardingRules []string `json:"forwardingRules,omitempty"` + + // Labels: Optional. Set of labels associated with the + // `LbRouteExtension` resource. The format must comply with the + // following requirements + // (/compute/docs/labeling-resources#requirements). + Labels map[string]string `json:"labels,omitempty"` + + // LoadBalancingScheme: Required. All backend services and forwarding + // rules referenced by this extension must share the same load balancing + // scheme. Supported values: `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. + // + // Possible values: + // "LOAD_BALANCING_SCHEME_UNSPECIFIED" - Default value. Do not use. + // "INTERNAL_MANAGED" - Signifies that this is used for Internal + // HTTP(S) Load Balancing. + // "EXTERNAL_MANAGED" - Signifies that this is used for External + // Managed HTTP(S) Load Balancing. + LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` + + // Name: Required. Name of the `LbRouteExtension` resource in the + // following format: + // `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_e + // xtension}`. + Name string `json:"name,omitempty"` + + // UpdateTime: Output only. The timestamp when the resource was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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 *LbRouteExtension) MarshalJSON() ([]byte, error) { + type NoMethod LbRouteExtension + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LbTrafficExtension: `LbTrafficExtension` is a resource that lets the +// extension service modify the headers and payloads of both requests +// and responses without impacting the choice of backend services or any +// other security policies associated with the backend service. +type LbTrafficExtension struct { + // CreateTime: Output only. The timestamp when the resource was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. A human-readable description of the resource. + Description string `json:"description,omitempty"` + + // ExtensionChains: Required. A set of ordered extension chains that + // contain the match conditions and extensions to execute. Match + // conditions for each extension chain are evaluated in sequence for a + // given request. The first extension chain that has a condition that + // matches the request is executed. Any subsequent extension chains do + // not execute. Limited to 5 extension chains per resource. + ExtensionChains []*ExtensionChain `json:"extensionChains,omitempty"` + + // ForwardingRules: Required. A list of references to the forwarding + // rules to which this service extension is attach to. At least one + // forwarding rule is required. There can be only one + // `LBTrafficExtension` resource per forwarding rule. + ForwardingRules []string `json:"forwardingRules,omitempty"` + + // Labels: Optional. Set of labels associated with the + // `LbTrafficExtension` resource. The format must comply with the + // following requirements + // (/compute/docs/labeling-resources#requirements). + Labels map[string]string `json:"labels,omitempty"` + + // LoadBalancingScheme: Required. All backend services and forwarding + // rules referenced by this extension must share the same load balancing + // scheme. Supported values: `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For + // more information, refer to Choosing a load balancer + // (https://cloud.google.com/load-balancing/docs/backend-service). + // + // Possible values: + // "LOAD_BALANCING_SCHEME_UNSPECIFIED" - Default value. Do not use. + // "INTERNAL_MANAGED" - Signifies that this is used for Internal + // HTTP(S) Load Balancing. + // "EXTERNAL_MANAGED" - Signifies that this is used for External + // Managed HTTP(S) Load Balancing. + LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"` + + // Name: Required. Name of the `LbTrafficExtension` resource in the + // following format: + // `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traff + // ic_extension}`. + Name string `json:"name,omitempty"` + + // UpdateTime: Output only. The timestamp when the resource was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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 *LbTrafficExtension) MarshalJSON() ([]byte, error) { + type NoMethod LbTrafficExtension + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListEndpointPoliciesResponse: Response returned by the // ListEndpointPolicies method. type ListEndpointPoliciesResponse struct { @@ -2279,82 +2698,164 @@ func (s *ListHttpRoutesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListLocationsResponse: The response message for -// Locations.ListLocations. -type ListLocationsResponse struct { - // Locations: A list of locations that matches the specified filter in - // the request. - Locations []*Location `json:"locations,omitempty"` +// ListLbRouteExtensionsResponse: Message for response to listing +// `LbRouteExtension` resources. +type ListLbRouteExtensionsResponse struct { + // LbRouteExtensions: The list of `LbRouteExtension` resources. + LbRouteExtensions []*LbRouteExtension `json:"lbRouteExtensions,omitempty"` - // NextPageToken: The standard List next-page token. + // NextPageToken: A token identifying a page of results that the server + // returns. NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Locations") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "LbRouteExtensions") + // 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. "Locations") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "LbRouteExtensions") 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 *ListLocationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListLocationsResponse +func (s *ListLbRouteExtensionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLbRouteExtensionsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListMeshesResponse: Response returned by the ListMeshes method. -type ListMeshesResponse struct { - // Meshes: List of Mesh resources. - Meshes []*Mesh `json:"meshes,omitempty"` +// ListLbTrafficExtensionsResponse: Message for response to listing +// `LbTrafficExtension` resources. +type ListLbTrafficExtensionsResponse struct { + // LbTrafficExtensions: The list of `LbTrafficExtension` resources. + LbTrafficExtensions []*LbTrafficExtension `json:"lbTrafficExtensions,omitempty"` - // NextPageToken: If there might be more results than those appearing in - // this response, then `next_page_token` is included. To get the next - // set of results, call this method again using the value of - // `next_page_token` as `page_token`. + // NextPageToken: A token identifying a page of results that the server + // returns. NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Meshes") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "LbTrafficExtensions") + // 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. "Meshes") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "LbTrafficExtensions") 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 *ListMeshesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListMeshesResponse +func (s *ListLbTrafficExtensionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLbTrafficExtensionsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListOperationsResponse: The response message for +// ListLocationsResponse: The response message for +// Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*Location `json:"locations,omitempty"` + + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Locations") 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. "Locations") 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 *ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListMeshesResponse: Response returned by the ListMeshes method. +type ListMeshesResponse struct { + // Meshes: List of Mesh resources. + Meshes []*Mesh `json:"meshes,omitempty"` + + // NextPageToken: If there might be more results than those appearing in + // this response, then `next_page_token` is included. To get the next + // set of results, call this method again using the value of + // `next_page_token` as `page_token`. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Meshes") 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. "Meshes") 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 *ListMeshesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListMeshesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for // Operations.ListOperations. type ListOperationsResponse struct { // NextPageToken: The standard List next-page token. @@ -8261,6 +8762,1784 @@ func (c *ProjectsLocationsHttpRoutesPatchCall) Do(opts ...googleapi.CallOption) } +// method id "networkservices.projects.locations.lbRouteExtensions.create": + +type ProjectsLocationsLbRouteExtensionsCreateCall struct { + s *Service + parent string + lbrouteextension *LbRouteExtension + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new `LbRouteExtension` resource in a given project +// and location. +// +// - parent: The parent resource of the `LbRouteExtension` resource. +// Must be in the format `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsLbRouteExtensionsService) Create(parent string, lbrouteextension *LbRouteExtension) *ProjectsLocationsLbRouteExtensionsCreateCall { + c := &ProjectsLocationsLbRouteExtensionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.lbrouteextension = lbrouteextension + return c +} + +// LbRouteExtensionId sets the optional parameter "lbRouteExtensionId": +// Required. User-provided ID of the `LbRouteExtension` resource to be +// created. +func (c *ProjectsLocationsLbRouteExtensionsCreateCall) LbRouteExtensionId(lbRouteExtensionId string) *ProjectsLocationsLbRouteExtensionsCreateCall { + c.urlParams_.Set("lbRouteExtensionId", lbRouteExtensionId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server can ignore the request if +// it has already been completed. The server guarantees that for at +// least 60 minutes since the first request. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, ignores the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsLbRouteExtensionsCreateCall) RequestId(requestId string) *ProjectsLocationsLbRouteExtensionsCreateCall { + c.urlParams_.Set("requestId", requestId) + 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 *ProjectsLocationsLbRouteExtensionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsCreateCall { + 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 *ProjectsLocationsLbRouteExtensionsCreateCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsCreateCall { + 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 *ProjectsLocationsLbRouteExtensionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLbRouteExtensionsCreateCall) 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.lbrouteextension) + 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, "v1beta1/{+parent}/lbRouteExtensions") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.lbRouteExtensions.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsLbRouteExtensionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new `LbRouteExtension` resource in a given project and location.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.lbRouteExtensions.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "lbRouteExtensionId": { + // "description": "Required. User-provided ID of the `LbRouteExtension` resource to be created.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource of the `LbRouteExtension` resource. Must be in the format `projects/{project}/locations/{location}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/lbRouteExtensions", + // "request": { + // "$ref": "LbRouteExtension" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.lbRouteExtensions.delete": + +type ProjectsLocationsLbRouteExtensionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified `LbRouteExtension` resource. +// +// - name: The name of the `LbRouteExtension` resource to delete. Must +// be in the format +// `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route +// _extension}`. +func (r *ProjectsLocationsLbRouteExtensionsService) Delete(name string) *ProjectsLocationsLbRouteExtensionsDeleteCall { + c := &ProjectsLocationsLbRouteExtensionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server can ignore the request if +// it has already been completed. The server guarantees that for at +// least 60 minutes after the first request. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, ignores the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) RequestId(requestId string) *ProjectsLocationsLbRouteExtensionsDeleteCall { + c.urlParams_.Set("requestId", requestId) + 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 *ProjectsLocationsLbRouteExtensionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsDeleteCall { + 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 *ProjectsLocationsLbRouteExtensionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsDeleteCall { + 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 *ProjectsLocationsLbRouteExtensionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) 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 + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.lbRouteExtensions.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified `LbRouteExtension` resource.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", + // "httpMethod": "DELETE", + // "id": "networkservices.projects.locations.lbRouteExtensions.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the `LbRouteExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.lbRouteExtensions.get": + +type ProjectsLocationsLbRouteExtensionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of the specified `LbRouteExtension` resource. +// +// - name: A name of the `LbRouteExtension` resource to get. Must be in +// the format +// `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route +// _extension}`. +func (r *ProjectsLocationsLbRouteExtensionsService) Get(name string) *ProjectsLocationsLbRouteExtensionsGetCall { + c := &ProjectsLocationsLbRouteExtensionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + 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 *ProjectsLocationsLbRouteExtensionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsGetCall { + 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 *ProjectsLocationsLbRouteExtensionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbRouteExtensionsGetCall { + 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 *ProjectsLocationsLbRouteExtensionsGetCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsGetCall { + 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 *ProjectsLocationsLbRouteExtensionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLbRouteExtensionsGetCall) 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, "v1beta1/{+name}") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.lbRouteExtensions.get" call. +// Exactly one of *LbRouteExtension or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *LbRouteExtension.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 *ProjectsLocationsLbRouteExtensionsGetCall) Do(opts ...googleapi.CallOption) (*LbRouteExtension, 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 := &LbRouteExtension{ + 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 details of the specified `LbRouteExtension` resource.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.lbRouteExtensions.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the `LbRouteExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "LbRouteExtension" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.lbRouteExtensions.list": + +type ProjectsLocationsLbRouteExtensionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists `LbRouteExtension` resources in a given project and +// location. +// +// - parent: The project and location from which the `LbRouteExtension` +// resources are listed, specified in the following format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsLbRouteExtensionsService) List(parent string) *ProjectsLocationsLbRouteExtensionsListCall { + c := &ProjectsLocationsLbRouteExtensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results. +func (c *ProjectsLocationsLbRouteExtensionsListCall) Filter(filter string) *ProjectsLocationsLbRouteExtensionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results. +func (c *ProjectsLocationsLbRouteExtensionsListCall) OrderBy(orderBy string) *ProjectsLocationsLbRouteExtensionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// The server might return fewer items than requested. If unspecified, +// the server picks an appropriate default. +func (c *ProjectsLocationsLbRouteExtensionsListCall) PageSize(pageSize int64) *ProjectsLocationsLbRouteExtensionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results that the server returns. +func (c *ProjectsLocationsLbRouteExtensionsListCall) PageToken(pageToken string) *ProjectsLocationsLbRouteExtensionsListCall { + c.urlParams_.Set("pageToken", pageToken) + 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 *ProjectsLocationsLbRouteExtensionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsListCall { + 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 *ProjectsLocationsLbRouteExtensionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbRouteExtensionsListCall { + 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 *ProjectsLocationsLbRouteExtensionsListCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsListCall { + 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 *ProjectsLocationsLbRouteExtensionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLbRouteExtensionsListCall) 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, "v1beta1/{+parent}/lbRouteExtensions") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.lbRouteExtensions.list" call. +// Exactly one of *ListLbRouteExtensionsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListLbRouteExtensionsResponse.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 *ProjectsLocationsLbRouteExtensionsListCall) Do(opts ...googleapi.CallOption) (*ListLbRouteExtensionsResponse, 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 := &ListLbRouteExtensionsResponse{ + 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": "Lists `LbRouteExtension` resources in a given project and location.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.lbRouteExtensions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filtering results.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Hint for how to order the results.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. The server might return fewer items than requested. If unspecified, the server picks an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A token identifying a page of results that the server returns.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location from which the `LbRouteExtension` resources are listed, specified in the following format: `projects/{project}/locations/{location}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/lbRouteExtensions", + // "response": { + // "$ref": "ListLbRouteExtensionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsLbRouteExtensionsListCall) Pages(ctx context.Context, f func(*ListLbRouteExtensionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "networkservices.projects.locations.lbRouteExtensions.patch": + +type ProjectsLocationsLbRouteExtensionsPatchCall struct { + s *Service + name string + lbrouteextension *LbRouteExtension + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of the specified `LbRouteExtension` +// resource. +// +// - name: Name of the `LbRouteExtension` resource in the following +// format: +// `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route +// _extension}`. +func (r *ProjectsLocationsLbRouteExtensionsService) Patch(name string, lbrouteextension *LbRouteExtension) *ProjectsLocationsLbRouteExtensionsPatchCall { + c := &ProjectsLocationsLbRouteExtensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.lbrouteextension = lbrouteextension + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server can ignore the request if +// it has already been completed. The server guarantees that for at +// least 60 minutes since the first request. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, ignores the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsLbRouteExtensionsPatchCall) RequestId(requestId string) *ProjectsLocationsLbRouteExtensionsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Used +// to specify the fields to be overwritten in the `LbRouteExtension` +// resource by the update. The fields specified in the update_mask are +// relative to the resource, not the full request. A field is +// overwritten if it is in the mask. If the user does not specify a +// mask, then all fields are overwritten. +func (c *ProjectsLocationsLbRouteExtensionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLbRouteExtensionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + 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 *ProjectsLocationsLbRouteExtensionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsPatchCall { + 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 *ProjectsLocationsLbRouteExtensionsPatchCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsPatchCall { + 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 *ProjectsLocationsLbRouteExtensionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLbRouteExtensionsPatchCall) 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.lbrouteextension) + 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, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.lbRouteExtensions.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of the specified `LbRouteExtension` resource.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", + // "httpMethod": "PATCH", + // "id": "networkservices.projects.locations.lbRouteExtensions.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the `LbRouteExtension` resource in the following format: `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Used to specify the fields to be overwritten in the `LbRouteExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "request": { + // "$ref": "LbRouteExtension" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.lbTrafficExtensions.create": + +type ProjectsLocationsLbTrafficExtensionsCreateCall struct { + s *Service + parent string + lbtrafficextension *LbTrafficExtension + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new `LbTrafficExtension` resource in a given +// project and location. +// +// - parent: The parent resource of the `LbTrafficExtension` resource. +// Must be in the format `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsLbTrafficExtensionsService) Create(parent string, lbtrafficextension *LbTrafficExtension) *ProjectsLocationsLbTrafficExtensionsCreateCall { + c := &ProjectsLocationsLbTrafficExtensionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.lbtrafficextension = lbtrafficextension + return c +} + +// LbTrafficExtensionId sets the optional parameter +// "lbTrafficExtensionId": Required. User-provided ID of the +// `LbTrafficExtension` resource to be created. +func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) LbTrafficExtensionId(lbTrafficExtensionId string) *ProjectsLocationsLbTrafficExtensionsCreateCall { + c.urlParams_.Set("lbTrafficExtensionId", lbTrafficExtensionId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server can ignore the request if +// it has already been completed. The server guarantees that for at +// least 60 minutes since the first request. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, ignores the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) RequestId(requestId string) *ProjectsLocationsLbTrafficExtensionsCreateCall { + c.urlParams_.Set("requestId", requestId) + 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 *ProjectsLocationsLbTrafficExtensionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsCreateCall { + 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 *ProjectsLocationsLbTrafficExtensionsCreateCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsCreateCall { + 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 *ProjectsLocationsLbTrafficExtensionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) 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.lbtrafficextension) + 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, "v1beta1/{+parent}/lbTrafficExtensions") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.lbTrafficExtensions.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new `LbTrafficExtension` resource in a given project and location.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions", + // "httpMethod": "POST", + // "id": "networkservices.projects.locations.lbTrafficExtensions.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "lbTrafficExtensionId": { + // "description": "Required. User-provided ID of the `LbTrafficExtension` resource to be created.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource of the `LbTrafficExtension` resource. Must be in the format `projects/{project}/locations/{location}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/lbTrafficExtensions", + // "request": { + // "$ref": "LbTrafficExtension" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.lbTrafficExtensions.delete": + +type ProjectsLocationsLbTrafficExtensionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified `LbTrafficExtension` resource. +// +// - name: The name of the `LbTrafficExtension` resource to delete. Must +// be in the format +// `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_tra +// ffic_extension}`. +func (r *ProjectsLocationsLbTrafficExtensionsService) Delete(name string) *ProjectsLocationsLbTrafficExtensionsDeleteCall { + c := &ProjectsLocationsLbTrafficExtensionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server can ignore the request if +// it has already been completed. The server guarantees that for at +// least 60 minutes after the first request. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, ignores the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) RequestId(requestId string) *ProjectsLocationsLbTrafficExtensionsDeleteCall { + c.urlParams_.Set("requestId", requestId) + 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 *ProjectsLocationsLbTrafficExtensionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsDeleteCall { + 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 *ProjectsLocationsLbTrafficExtensionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsDeleteCall { + 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 *ProjectsLocationsLbTrafficExtensionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) 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 + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.lbTrafficExtensions.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified `LbTrafficExtension` resource.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", + // "httpMethod": "DELETE", + // "id": "networkservices.projects.locations.lbTrafficExtensions.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the `LbTrafficExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.lbTrafficExtensions.get": + +type ProjectsLocationsLbTrafficExtensionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of the specified `LbTrafficExtension` resource. +// +// - name: A name of the `LbTrafficExtension` resource to get. Must be +// in the format +// `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_tra +// ffic_extension}`. +func (r *ProjectsLocationsLbTrafficExtensionsService) Get(name string) *ProjectsLocationsLbTrafficExtensionsGetCall { + c := &ProjectsLocationsLbTrafficExtensionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + 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 *ProjectsLocationsLbTrafficExtensionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsGetCall { + 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 *ProjectsLocationsLbTrafficExtensionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbTrafficExtensionsGetCall { + 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 *ProjectsLocationsLbTrafficExtensionsGetCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsGetCall { + 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 *ProjectsLocationsLbTrafficExtensionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLbTrafficExtensionsGetCall) 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, "v1beta1/{+name}") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.lbTrafficExtensions.get" call. +// Exactly one of *LbTrafficExtension or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *LbTrafficExtension.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 *ProjectsLocationsLbTrafficExtensionsGetCall) Do(opts ...googleapi.CallOption) (*LbTrafficExtension, 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 := &LbTrafficExtension{ + 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 details of the specified `LbTrafficExtension` resource.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.lbTrafficExtensions.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. A name of the `LbTrafficExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "LbTrafficExtension" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkservices.projects.locations.lbTrafficExtensions.list": + +type ProjectsLocationsLbTrafficExtensionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists `LbTrafficExtension` resources in a given project and +// location. +// +// - parent: The project and location from which the +// `LbTrafficExtension` resources are listed, specified in the +// following format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsLbTrafficExtensionsService) List(parent string) *ProjectsLocationsLbTrafficExtensionsListCall { + c := &ProjectsLocationsLbTrafficExtensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results. +func (c *ProjectsLocationsLbTrafficExtensionsListCall) Filter(filter string) *ProjectsLocationsLbTrafficExtensionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results. +func (c *ProjectsLocationsLbTrafficExtensionsListCall) OrderBy(orderBy string) *ProjectsLocationsLbTrafficExtensionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// The server might return fewer items than requested. If unspecified, +// the server picks an appropriate default. +func (c *ProjectsLocationsLbTrafficExtensionsListCall) PageSize(pageSize int64) *ProjectsLocationsLbTrafficExtensionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results that the server returns. +func (c *ProjectsLocationsLbTrafficExtensionsListCall) PageToken(pageToken string) *ProjectsLocationsLbTrafficExtensionsListCall { + c.urlParams_.Set("pageToken", pageToken) + 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 *ProjectsLocationsLbTrafficExtensionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsListCall { + 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 *ProjectsLocationsLbTrafficExtensionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbTrafficExtensionsListCall { + 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 *ProjectsLocationsLbTrafficExtensionsListCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsListCall { + 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 *ProjectsLocationsLbTrafficExtensionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLbTrafficExtensionsListCall) 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, "v1beta1/{+parent}/lbTrafficExtensions") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.lbTrafficExtensions.list" call. +// Exactly one of *ListLbTrafficExtensionsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListLbTrafficExtensionsResponse.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 *ProjectsLocationsLbTrafficExtensionsListCall) Do(opts ...googleapi.CallOption) (*ListLbTrafficExtensionsResponse, 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 := &ListLbTrafficExtensionsResponse{ + 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": "Lists `LbTrafficExtension` resources in a given project and location.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions", + // "httpMethod": "GET", + // "id": "networkservices.projects.locations.lbTrafficExtensions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filtering results.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Hint for how to order the results.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. The server might return fewer items than requested. If unspecified, the server picks an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A token identifying a page of results that the server returns.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location from which the `LbTrafficExtension` resources are listed, specified in the following format: `projects/{project}/locations/{location}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/lbTrafficExtensions", + // "response": { + // "$ref": "ListLbTrafficExtensionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsLbTrafficExtensionsListCall) Pages(ctx context.Context, f func(*ListLbTrafficExtensionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "networkservices.projects.locations.lbTrafficExtensions.patch": + +type ProjectsLocationsLbTrafficExtensionsPatchCall struct { + s *Service + name string + lbtrafficextension *LbTrafficExtension + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of the specified `LbTrafficExtension` +// resource. +// +// - name: Name of the `LbTrafficExtension` resource in the following +// format: +// `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_tra +// ffic_extension}`. +func (r *ProjectsLocationsLbTrafficExtensionsService) Patch(name string, lbtrafficextension *LbTrafficExtension) *ProjectsLocationsLbTrafficExtensionsPatchCall { + c := &ProjectsLocationsLbTrafficExtensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.lbtrafficextension = lbtrafficextension + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server can ignore the request if +// it has already been completed. The server guarantees that for at +// least 60 minutes since the first request. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, ignores the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) RequestId(requestId string) *ProjectsLocationsLbTrafficExtensionsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Used +// to specify the fields to be overwritten in the `LbTrafficExtension` +// resource by the update. The fields specified in the update_mask are +// relative to the resource, not the full request. A field is +// overwritten if it is in the mask. If the user does not specify a +// mask, then all fields are overwritten. +func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLbTrafficExtensionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + 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 *ProjectsLocationsLbTrafficExtensionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsPatchCall { + 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 *ProjectsLocationsLbTrafficExtensionsPatchCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsPatchCall { + 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 *ProjectsLocationsLbTrafficExtensionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) 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.lbtrafficextension) + 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, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkservices.projects.locations.lbTrafficExtensions.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of the specified `LbTrafficExtension` resource.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", + // "httpMethod": "PATCH", + // "id": "networkservices.projects.locations.lbTrafficExtensions.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the `LbTrafficExtension` resource in the following format: `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Used to specify the fields to be overwritten in the `LbTrafficExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "request": { + // "$ref": "LbTrafficExtension" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "networkservices.projects.locations.meshes.create": type ProjectsLocationsMeshesCreateCall struct { diff --git a/redis/v1/redis-api.json b/redis/v1/redis-api.json index 0f4b1343bf9..af146c25f21 100644 --- a/redis/v1/redis-api.json +++ b/redis/v1/redis-api.json @@ -177,6 +177,203 @@ } }, "resources": { + "clusters": { + "methods": { + "create": { + "description": "Creates a Redis cluster based on the specified properties. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis cluster will be fully functional. The completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters", + "httpMethod": "POST", + "id": "redis.projects.locations.clusters.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "clusterId": { + "description": "Required. The logical name of the Redis cluster in the customer project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the customer project / location", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the cluster location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Idempotent request UUID.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/clusters", + "request": { + "$ref": "Cluster" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a specific Redis cluster. Cluster stops serving and data is deleted.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + "httpMethod": "DELETE", + "id": "redis.projects.locations.clusters.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Redis cluster resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Idempotent request UUID.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a specific Redis cluster.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + "httpMethod": "GET", + "id": "redis.projects.locations.clusters.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Redis cluster resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Cluster" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getCertificateAuthority": { + "description": "Gets the details of certificate authority information for Redis cluster.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/certificateAuthority", + "httpMethod": "GET", + "id": "redis.projects.locations.clusters.getCertificateAuthority", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Redis cluster certificate authority resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority` where `location_id` refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}/certificateAuthority", + "response": { + "$ref": "CertificateAuthority" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all Redis clusters owned by a project in either the specified location (region) or all locations. The location should have the following format: * `projects/{project_id}/locations/{location_id}` If `location_id` is specified as `-` (wildcard), then all regions available to the project are queried, and the results are aggregated.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters", + "httpMethod": "GET", + "id": "redis.projects.locations.clusters.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of items to return. If not specified, a default value of 1000 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's `next_page_token` to determine if there are more clusters left to be queried.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The `next_page_token` value returned from a previous ListClusters request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the cluster location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/clusters", + "response": { + "$ref": "ListClustersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the metadata and configuration of a specific Redis cluster. Completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + "httpMethod": "PATCH", + "id": "redis.projects.locations.clusters.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Idempotent request UUID.", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from Cluster: * `size_gb` * `replica_count`", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Cluster" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "instances": { "methods": { "create": { @@ -624,9 +821,168 @@ } } }, - "revision": "20230804", + "revision": "20230925", "rootUrl": "https://redis.googleapis.com/", "schemas": { + "CertChain": { + "id": "CertChain", + "properties": { + "certificates": { + "description": "The certificates that form the CA chain, from leaf to root order.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "CertificateAuthority": { + "description": "Redis cluster certificate authority", + "id": "CertificateAuthority", + "properties": { + "managedServerCa": { + "$ref": "ManagedCertificateAuthority" + } + }, + "type": "object" + }, + "Cluster": { + "description": "A cluster instance.", + "id": "Cluster", + "properties": { + "authorizationMode": { + "description": "Optional. The authorization mode of the Redis cluster. If not provided, auth feature is disabled for the cluster.", + "enum": [ + "AUTH_MODE_UNSPECIFIED", + "AUTH_MODE_IAM_AUTH", + "AUTH_MODE_DISABLED" + ], + "enumDescriptions": [ + "Not set.", + "IAM basic authorization mode", + "Authorization disabled mode" + ], + "type": "string" + }, + "createTime": { + "description": "Output only. The timestamp associated with the cluster creation request.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "discoveryEndpoints": { + "description": "Output only. Endpoints created on each given network, for Redis clients to connect to the cluster. Currently only one discovery endpoint is supported.", + "items": { + "$ref": "DiscoveryEndpoint" + }, + "readOnly": true, + "type": "array" + }, + "name": { + "description": "Required. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`", + "type": "string" + }, + "pscConfigs": { + "description": "Required. Each PscConfig configures the consumer network where IPs will be designated to the cluster for client access through Private Service Connect Automation. Currently, only one PscConfig is supported.", + "items": { + "$ref": "PscConfig" + }, + "type": "array" + }, + "pscConnections": { + "description": "Output only. PSC connections for discovery of the cluster topology and accessing the cluster.", + "items": { + "$ref": "PscConnection" + }, + "readOnly": true, + "type": "array" + }, + "replicaCount": { + "description": "Optional. The number of replica nodes per shard.", + "format": "int32", + "type": "integer" + }, + "shardCount": { + "description": "Required. Number of shards for the Redis cluster.", + "format": "int32", + "type": "integer" + }, + "sizeGb": { + "description": "Output only. Redis memory size in GB for the entire cluster.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "state": { + "description": "Output only. The current state of this cluster. Can be CREATING, READY, UPDATING, DELETING and SUSPENDED", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "UPDATING", + "DELETING" + ], + "enumDescriptions": [ + "Not set.", + "Redis cluster is being created.", + "Redis cluster has been created and is fully usable.", + "Redis cluster configuration is being updated.", + "Redis cluster is being deleted." + ], + "readOnly": true, + "type": "string" + }, + "stateInfo": { + "$ref": "StateInfo", + "description": "Output only. Additional information about the current state of the cluster.", + "readOnly": true + }, + "transitEncryptionMode": { + "description": "Optional. The in-transit encryption for the Redis cluster. If not provided, encryption is disabled for the cluster.", + "enum": [ + "TRANSIT_ENCRYPTION_MODE_UNSPECIFIED", + "TRANSIT_ENCRYPTION_MODE_DISABLED", + "TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION" + ], + "enumDescriptions": [ + "In-transit encryption not set.", + "In-transit encryption disabled.", + "Use server managed encryption for in-transit encryption." + ], + "type": "string" + }, + "uid": { + "description": "Output only. System assigned, unique identifier for the cluster.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "DiscoveryEndpoint": { + "description": "Endpoints on each network, for Redis clients to connect to the cluster.", + "id": "DiscoveryEndpoint", + "properties": { + "address": { + "description": "Output only. Address of the exposed Redis endpoint used by clients to connect to the service. The address could be either IP or hostname.", + "readOnly": true, + "type": "string" + }, + "port": { + "description": "Output only. The port number of the exposed Redis endpoint.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "pscConfig": { + "$ref": "PscConfig", + "description": "Output only. Customer configuration for where the endpoint is created and accessed from.", + "readOnly": true + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -1030,6 +1386,31 @@ }, "type": "object" }, + "ListClustersResponse": { + "description": "Response for ListClusters.", + "id": "ListClustersResponse", + "properties": { + "clusters": { + "description": "A list of Redis clusters in the project in the specified location, or across all locations. If the `location_id` in the parent field of the request is \"-\", all regions available to the project are queried, and the results aggregated. If in such an aggregated query a location is unavailable, a placeholder Redis entry is included in the response with the `name` field set to a value of the form `projects/{project_id}/locations/{location_id}/clusters/`- and the `status` field set to ERROR and `status_message` field set to \"location not available for ListClusters\".", + "items": { + "$ref": "Cluster" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListInstancesResponse": { "description": "Response for ListInstances.", "id": "ListInstancesResponse", @@ -1185,6 +1566,19 @@ }, "type": "object" }, + "ManagedCertificateAuthority": { + "id": "ManagedCertificateAuthority", + "properties": { + "caCerts": { + "description": "The PEM encoded CA certificate chains for redis managed server authentication", + "items": { + "$ref": "CertChain" + }, + "type": "array" + } + }, + "type": "object" + }, "NodeInfo": { "description": "Node specific properties.", "id": "NodeInfo", @@ -1237,6 +1631,50 @@ }, "type": "object" }, + "OperationMetadata": { + "description": "Pre-defined metadata fields.", + "id": "OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "OutputConfig": { "description": "The output content", "id": "OutputConfig", @@ -1298,6 +1736,47 @@ }, "type": "object" }, + "PscConfig": { + "id": "PscConfig", + "properties": { + "network": { + "description": "Required. The network where the IP address of the discovery endpoint will be reserved, in the form of projects/{network_project}/global/networks/{network_id}.", + "type": "string" + } + }, + "type": "object" + }, + "PscConnection": { + "description": "Details of consumer resources in a PSC connection.", + "id": "PscConnection", + "properties": { + "address": { + "description": "Output only. The IP allocated on the consumer network for the PSC forwarding rule.", + "readOnly": true, + "type": "string" + }, + "forwardingRule": { + "description": "Output only. The URI of the consumer side forwarding rule. Example: projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.", + "readOnly": true, + "type": "string" + }, + "network": { + "description": "The consumer network where the IP address resides, in the form of projects/{project_id}/global/networks/{network_id}.", + "type": "string" + }, + "projectId": { + "description": "Output only. The consumer project_id where the forwarding rule is created from.", + "readOnly": true, + "type": "string" + }, + "pscConnectionId": { + "description": "Output only. The PSC connection id of the forwarding rule connected to the service attachment.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ReconciliationOperationMetadata": { "description": "Operation metadata returned by the CLH during resource state reconciliation.", "id": "ReconciliationOperationMetadata", @@ -1357,6 +1836,17 @@ }, "type": "object" }, + "StateInfo": { + "description": "Represents additional information about the state of the cluster.", + "id": "StateInfo", + "properties": { + "updateInfo": { + "$ref": "UpdateInfo", + "description": "Describes ongoing update on the cluster when cluster state is UPDATING." + } + }, + "type": "object" + }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", "id": "Status", @@ -1442,6 +1932,23 @@ }, "type": "object" }, + "UpdateInfo": { + "description": "Represents information about an updating cluster.", + "id": "UpdateInfo", + "properties": { + "targetReplicaCount": { + "description": "Target number of replica nodes per shard.", + "format": "int32", + "type": "integer" + }, + "targetShardCount": { + "description": "Target number of shards for redis cluster", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "UpgradeInstanceRequest": { "description": "Request for UpgradeInstance.", "id": "UpgradeInstanceRequest", diff --git a/redis/v1/redis-gen.go b/redis/v1/redis-gen.go index 40351fb3170..c95f1183bb6 100644 --- a/redis/v1/redis-gen.go +++ b/redis/v1/redis-gen.go @@ -167,6 +167,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} + rs.Clusters = NewProjectsLocationsClustersService(s) rs.Instances = NewProjectsLocationsInstancesService(s) rs.Operations = NewProjectsLocationsOperationsService(s) return rs @@ -175,11 +176,22 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { type ProjectsLocationsService struct { s *Service + Clusters *ProjectsLocationsClustersService + Instances *ProjectsLocationsInstancesService Operations *ProjectsLocationsOperationsService } +func NewProjectsLocationsClustersService(s *Service) *ProjectsLocationsClustersService { + rs := &ProjectsLocationsClustersService{s: s} + return rs +} + +type ProjectsLocationsClustersService struct { + s *Service +} + func NewProjectsLocationsInstancesService(s *Service) *ProjectsLocationsInstancesService { rs := &ProjectsLocationsInstancesService{s: s} return rs @@ -198,6 +210,207 @@ type ProjectsLocationsOperationsService struct { s *Service } +type CertChain struct { + // Certificates: The certificates that form the CA chain, from leaf to + // root order. + Certificates []string `json:"certificates,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Certificates") 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. "Certificates") 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 *CertChain) MarshalJSON() ([]byte, error) { + type NoMethod CertChain + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CertificateAuthority: Redis cluster certificate authority +type CertificateAuthority struct { + ManagedServerCa *ManagedCertificateAuthority `json:"managedServerCa,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ManagedServerCa") 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. "ManagedServerCa") 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 *CertificateAuthority) MarshalJSON() ([]byte, error) { + type NoMethod CertificateAuthority + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Cluster: A cluster instance. +type Cluster struct { + // AuthorizationMode: Optional. The authorization mode of the Redis + // cluster. If not provided, auth feature is disabled for the cluster. + // + // Possible values: + // "AUTH_MODE_UNSPECIFIED" - Not set. + // "AUTH_MODE_IAM_AUTH" - IAM basic authorization mode + // "AUTH_MODE_DISABLED" - Authorization disabled mode + AuthorizationMode string `json:"authorizationMode,omitempty"` + + // CreateTime: Output only. The timestamp associated with the cluster + // creation request. + CreateTime string `json:"createTime,omitempty"` + + // DiscoveryEndpoints: Output only. Endpoints created on each given + // network, for Redis clients to connect to the cluster. Currently only + // one discovery endpoint is supported. + DiscoveryEndpoints []*DiscoveryEndpoint `json:"discoveryEndpoints,omitempty"` + + // Name: Required. Unique name of the resource in this scope including + // project and location using the form: + // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + Name string `json:"name,omitempty"` + + // PscConfigs: Required. Each PscConfig configures the consumer network + // where IPs will be designated to the cluster for client access through + // Private Service Connect Automation. Currently, only one PscConfig is + // supported. + PscConfigs []*PscConfig `json:"pscConfigs,omitempty"` + + // PscConnections: Output only. PSC connections for discovery of the + // cluster topology and accessing the cluster. + PscConnections []*PscConnection `json:"pscConnections,omitempty"` + + // ReplicaCount: Optional. The number of replica nodes per shard. + ReplicaCount int64 `json:"replicaCount,omitempty"` + + // ShardCount: Required. Number of shards for the Redis cluster. + ShardCount int64 `json:"shardCount,omitempty"` + + // SizeGb: Output only. Redis memory size in GB for the entire cluster. + SizeGb int64 `json:"sizeGb,omitempty"` + + // State: Output only. The current state of this cluster. Can be + // CREATING, READY, UPDATING, DELETING and SUSPENDED + // + // Possible values: + // "STATE_UNSPECIFIED" - Not set. + // "CREATING" - Redis cluster is being created. + // "ACTIVE" - Redis cluster has been created and is fully usable. + // "UPDATING" - Redis cluster configuration is being updated. + // "DELETING" - Redis cluster is being deleted. + State string `json:"state,omitempty"` + + // StateInfo: Output only. Additional information about the current + // state of the cluster. + StateInfo *StateInfo `json:"stateInfo,omitempty"` + + // TransitEncryptionMode: Optional. The in-transit encryption for the + // Redis cluster. If not provided, encryption is disabled for the + // cluster. + // + // Possible values: + // "TRANSIT_ENCRYPTION_MODE_UNSPECIFIED" - In-transit encryption not + // set. + // "TRANSIT_ENCRYPTION_MODE_DISABLED" - In-transit encryption + // disabled. + // "TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION" - Use server + // managed encryption for in-transit encryption. + TransitEncryptionMode string `json:"transitEncryptionMode,omitempty"` + + // Uid: Output only. System assigned, unique identifier for the cluster. + Uid string `json:"uid,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AuthorizationMode") + // 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. "AuthorizationMode") 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 *Cluster) MarshalJSON() ([]byte, error) { + type NoMethod Cluster + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DiscoveryEndpoint: Endpoints on each network, for Redis clients to +// connect to the cluster. +type DiscoveryEndpoint struct { + // Address: Output only. Address of the exposed Redis endpoint used by + // clients to connect to the service. The address could be either IP or + // hostname. + Address string `json:"address,omitempty"` + + // Port: Output only. The port number of the exposed Redis endpoint. + Port int64 `json:"port,omitempty"` + + // PscConfig: Output only. Customer configuration for where the endpoint + // is created and accessed from. + PscConfig *PscConfig `json:"pscConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Address") 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. "Address") 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 *DiscoveryEndpoint) MarshalJSON() ([]byte, error) { + type NoMethod DiscoveryEndpoint + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -774,6 +987,53 @@ func (s *InstanceAuthString) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListClustersResponse: Response for ListClusters. +type ListClustersResponse struct { + // Clusters: A list of Redis clusters in the project in the specified + // location, or across all locations. If the `location_id` in the parent + // field of the request is "-", all regions available to the project are + // queried, and the results aggregated. If in such an aggregated query a + // location is unavailable, a placeholder Redis entry is included in the + // response with the `name` field set to a value of the form + // `projects/{project_id}/locations/{location_id}/clusters/`- and the + // `status` field set to ERROR and `status_message` field set to + // "location not available for ListClusters". + Clusters []*Cluster `json:"clusters,omitempty"` + + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Clusters") 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. "Clusters") 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 *ListClustersResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListClustersResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListInstancesResponse: Response for ListInstances. type ListInstancesResponse struct { // Instances: A list of Redis instances in the project in the specified @@ -1028,6 +1288,34 @@ func (s *MaintenanceSchedule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ManagedCertificateAuthority struct { + // CaCerts: The PEM encoded CA certificate chains for redis managed + // server authentication + CaCerts []*CertChain `json:"caCerts,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CaCerts") 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. "CaCerts") 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 *ManagedCertificateAuthority) MarshalJSON() ([]byte, error) { + type NoMethod ManagedCertificateAuthority + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // NodeInfo: Node specific properties. type NodeInfo struct { // Id: Output only. Node identifying string. e.g. 'node-0', 'node-1' @@ -1126,6 +1414,57 @@ func (s *Operation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// OperationMetadata: Pre-defined metadata fields. +type OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") 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. "ApiVersion") 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 *OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // OutputConfig: The output content type OutputConfig struct { // GcsDestination: Google Cloud Storage destination for output content. @@ -1216,26 +1555,13 @@ func (s *PersistenceConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ReconciliationOperationMetadata: Operation metadata returned by the -// CLH during resource state reconciliation. -type ReconciliationOperationMetadata struct { - // DeleteResource: DEPRECATED. Use exclusive_action instead. - DeleteResource bool `json:"deleteResource,omitempty"` - - // ExclusiveAction: Excluisive action returned by the CLH. - // - // Possible values: - // "UNKNOWN_REPAIR_ACTION" - Unknown repair action. - // "DELETE" - The resource has to be deleted. When using this bit, the - // CLH should fail the operation. DEPRECATED. Instead use - // DELETE_RESOURCE OperationSignal in SideChannel. - // "RETRY" - This resource could not be repaired but the repair should - // be tried again at a later time. This can happen if there is a - // dependency that needs to be resolved first- e.g. if a parent resource - // must be repaired before a child resource. - ExclusiveAction string `json:"exclusiveAction,omitempty"` +type PscConfig struct { + // Network: Required. The network where the IP address of the discovery + // endpoint will be reserved, in the form of + // projects/{network_project}/global/networks/{network_id}. + Network string `json:"network,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeleteResource") to + // ForceSendFields is a list of field names (e.g. "Network") 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 @@ -1243,27 +1569,116 @@ type ReconciliationOperationMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeleteResource") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Network") 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 *ReconciliationOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod ReconciliationOperationMetadata +func (s *PscConfig) MarshalJSON() ([]byte, error) { + type NoMethod PscConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// RescheduleMaintenanceRequest: Request for RescheduleMaintenance. -type RescheduleMaintenanceRequest struct { - // RescheduleType: Required. If reschedule type is SPECIFIC_TIME, must - // set up schedule_time as well. - // +// PscConnection: Details of consumer resources in a PSC connection. +type PscConnection struct { + // Address: Output only. The IP allocated on the consumer network for + // the PSC forwarding rule. + Address string `json:"address,omitempty"` + + // ForwardingRule: Output only. The URI of the consumer side forwarding + // rule. Example: + // projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId + // }. + ForwardingRule string `json:"forwardingRule,omitempty"` + + // Network: The consumer network where the IP address resides, in the + // form of projects/{project_id}/global/networks/{network_id}. + Network string `json:"network,omitempty"` + + // ProjectId: Output only. The consumer project_id where the forwarding + // rule is created from. + ProjectId string `json:"projectId,omitempty"` + + // PscConnectionId: Output only. The PSC connection id of the forwarding + // rule connected to the service attachment. + PscConnectionId string `json:"pscConnectionId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Address") 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. "Address") 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 *PscConnection) MarshalJSON() ([]byte, error) { + type NoMethod PscConnection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReconciliationOperationMetadata: Operation metadata returned by the +// CLH during resource state reconciliation. +type ReconciliationOperationMetadata struct { + // DeleteResource: DEPRECATED. Use exclusive_action instead. + DeleteResource bool `json:"deleteResource,omitempty"` + + // ExclusiveAction: Excluisive action returned by the CLH. + // + // Possible values: + // "UNKNOWN_REPAIR_ACTION" - Unknown repair action. + // "DELETE" - The resource has to be deleted. When using this bit, the + // CLH should fail the operation. DEPRECATED. Instead use + // DELETE_RESOURCE OperationSignal in SideChannel. + // "RETRY" - This resource could not be repaired but the repair should + // be tried again at a later time. This can happen if there is a + // dependency that needs to be resolved first- e.g. if a parent resource + // must be repaired before a child resource. + ExclusiveAction string `json:"exclusiveAction,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeleteResource") 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. "DeleteResource") 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 *ReconciliationOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod ReconciliationOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RescheduleMaintenanceRequest: Request for RescheduleMaintenance. +type RescheduleMaintenanceRequest struct { + // RescheduleType: Required. If reschedule type is SPECIFIC_TIME, must + // set up schedule_time as well. + // // Possible values: // "RESCHEDULE_TYPE_UNSPECIFIED" - Not set. // "IMMEDIATE" - If the user wants to schedule the maintenance to @@ -1303,6 +1718,36 @@ func (s *RescheduleMaintenanceRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// StateInfo: Represents additional information about the state of the +// cluster. +type StateInfo struct { + // UpdateInfo: Describes ongoing update on the cluster when cluster + // state is UPDATING. + UpdateInfo *UpdateInfo `json:"updateInfo,omitempty"` + + // ForceSendFields is a list of field names (e.g. "UpdateInfo") 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. "UpdateInfo") 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 *StateInfo) MarshalJSON() ([]byte, error) { + type NoMethod StateInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Status: The `Status` type defines a logical error model that is // suitable for different programming environments, including REST APIs // and RPC APIs. It is used by gRPC (https://github.com/grpc). Each @@ -1435,6 +1880,38 @@ func (s *TlsCertificate) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// UpdateInfo: Represents information about an updating cluster. +type UpdateInfo struct { + // TargetReplicaCount: Target number of replica nodes per shard. + TargetReplicaCount int64 `json:"targetReplicaCount,omitempty"` + + // TargetShardCount: Target number of shards for redis cluster + TargetShardCount int64 `json:"targetShardCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TargetReplicaCount") + // 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. "TargetReplicaCount") 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 *UpdateInfo) MarshalJSON() ([]byte, error) { + type NoMethod UpdateInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // UpgradeInstanceRequest: Request for UpgradeInstance. type UpgradeInstanceRequest struct { // RedisVersion: Required. Specifies the target version of Redis @@ -1866,6 +2343,1009 @@ func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocat } } +// method id "redis.projects.locations.clusters.create": + +type ProjectsLocationsClustersCreateCall struct { + s *Service + parent string + cluster *Cluster + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Redis cluster based on the specified properties. +// The creation is executed asynchronously and callers may check the +// returned operation to track its progress. Once the operation is +// completed the Redis cluster will be fully functional. The completed +// longrunning.Operation will contain the new cluster object in the +// response field. The returned operation is automatically deleted after +// a few hours, so there is no need to call DeleteOperation. +// +// - parent: The resource name of the cluster location using the form: +// `projects/{project_id}/locations/{location_id}` where `location_id` +// refers to a GCP region. +func (r *ProjectsLocationsClustersService) Create(parent string, cluster *Cluster) *ProjectsLocationsClustersCreateCall { + c := &ProjectsLocationsClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.cluster = cluster + return c +} + +// ClusterId sets the optional parameter "clusterId": Required. The +// logical name of the Redis cluster in the customer project with the +// following restrictions: * Must contain only lowercase letters, +// numbers, and hyphens. * Must start with a letter. * Must be between +// 1-63 characters. * Must end with a number or a letter. * Must be +// unique within the customer project / location +func (c *ProjectsLocationsClustersCreateCall) ClusterId(clusterId string) *ProjectsLocationsClustersCreateCall { + c.urlParams_.Set("clusterId", clusterId) + return c +} + +// RequestId sets the optional parameter "requestId": Idempotent request +// UUID. +func (c *ProjectsLocationsClustersCreateCall) RequestId(requestId string) *ProjectsLocationsClustersCreateCall { + c.urlParams_.Set("requestId", requestId) + 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 *ProjectsLocationsClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersCreateCall { + 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 *ProjectsLocationsClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsClustersCreateCall { + 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 *ProjectsLocationsClustersCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersCreateCall) 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.cluster) + 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/{+parent}/clusters") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "redis.projects.locations.clusters.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a Redis cluster based on the specified properties. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis cluster will be fully functional. The completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters", + // "httpMethod": "POST", + // "id": "redis.projects.locations.clusters.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "clusterId": { + // "description": "Required. The logical name of the Redis cluster in the customer project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the customer project / location", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the cluster location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Idempotent request UUID.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/clusters", + // "request": { + // "$ref": "Cluster" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "redis.projects.locations.clusters.delete": + +type ProjectsLocationsClustersDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a specific Redis cluster. Cluster stops serving and +// data is deleted. +// +// - name: Redis cluster resource name using the form: +// `projects/{project_id}/locations/{location_id}/clusters/{cluster_id} +// ` where `location_id` refers to a GCP region. +func (r *ProjectsLocationsClustersService) Delete(name string) *ProjectsLocationsClustersDeleteCall { + c := &ProjectsLocationsClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": Idempotent request +// UUID. +func (c *ProjectsLocationsClustersDeleteCall) RequestId(requestId string) *ProjectsLocationsClustersDeleteCall { + c.urlParams_.Set("requestId", requestId) + 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 *ProjectsLocationsClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersDeleteCall { + 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 *ProjectsLocationsClustersDeleteCall) Context(ctx context.Context) *ProjectsLocationsClustersDeleteCall { + 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 *ProjectsLocationsClustersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersDeleteCall) 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 + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "redis.projects.locations.clusters.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a specific Redis cluster. Cluster stops serving and data is deleted.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + // "httpMethod": "DELETE", + // "id": "redis.projects.locations.clusters.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Redis cluster resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` refers to a GCP region.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Idempotent request UUID.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "redis.projects.locations.clusters.get": + +type ProjectsLocationsClustersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a specific Redis cluster. +// +// - name: Redis cluster resource name using the form: +// `projects/{project_id}/locations/{location_id}/clusters/{cluster_id} +// ` where `location_id` refers to a GCP region. +func (r *ProjectsLocationsClustersService) Get(name string) *ProjectsLocationsClustersGetCall { + c := &ProjectsLocationsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + 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 *ProjectsLocationsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGetCall { + 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 *ProjectsLocationsClustersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersGetCall { + 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 *ProjectsLocationsClustersGetCall) Context(ctx context.Context) *ProjectsLocationsClustersGetCall { + 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 *ProjectsLocationsClustersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersGetCall) 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/{+name}") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "redis.projects.locations.clusters.get" call. +// Exactly one of *Cluster or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Cluster.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 *ProjectsLocationsClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, 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 := &Cluster{ + 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 details of a specific Redis cluster.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + // "httpMethod": "GET", + // "id": "redis.projects.locations.clusters.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Redis cluster resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` refers to a GCP region.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Cluster" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "redis.projects.locations.clusters.getCertificateAuthority": + +type ProjectsLocationsClustersGetCertificateAuthorityCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetCertificateAuthority: Gets the details of certificate authority +// information for Redis cluster. +// +// - name: Redis cluster certificate authority resource name using the +// form: +// `projects/{project_id}/locations/{location_id}/clusters/{cluster_id} +// /certificateAuthority` where `location_id` refers to a GCP region. +func (r *ProjectsLocationsClustersService) GetCertificateAuthority(name string) *ProjectsLocationsClustersGetCertificateAuthorityCall { + c := &ProjectsLocationsClustersGetCertificateAuthorityCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + 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 *ProjectsLocationsClustersGetCertificateAuthorityCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGetCertificateAuthorityCall { + 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 *ProjectsLocationsClustersGetCertificateAuthorityCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersGetCertificateAuthorityCall { + 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 *ProjectsLocationsClustersGetCertificateAuthorityCall) Context(ctx context.Context) *ProjectsLocationsClustersGetCertificateAuthorityCall { + 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 *ProjectsLocationsClustersGetCertificateAuthorityCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersGetCertificateAuthorityCall) 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/{+name}/certificateAuthority") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "redis.projects.locations.clusters.getCertificateAuthority" call. +// Exactly one of *CertificateAuthority or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *CertificateAuthority.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 *ProjectsLocationsClustersGetCertificateAuthorityCall) Do(opts ...googleapi.CallOption) (*CertificateAuthority, 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 := &CertificateAuthority{ + 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 details of certificate authority information for Redis cluster.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/certificateAuthority", + // "httpMethod": "GET", + // "id": "redis.projects.locations.clusters.getCertificateAuthority", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Redis cluster certificate authority resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority` where `location_id` refers to a GCP region.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}/certificateAuthority", + // "response": { + // "$ref": "CertificateAuthority" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "redis.projects.locations.clusters.list": + +type ProjectsLocationsClustersListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all Redis clusters owned by a project in either the +// specified location (region) or all locations. The location should +// have the following format: * +// `projects/{project_id}/locations/{location_id}` If `location_id` is +// specified as `-` (wildcard), then all regions available to the +// project are queried, and the results are aggregated. +// +// - parent: The resource name of the cluster location using the form: +// `projects/{project_id}/locations/{location_id}` where `location_id` +// refers to a GCP region. +func (r *ProjectsLocationsClustersService) List(parent string) *ProjectsLocationsClustersListCall { + c := &ProjectsLocationsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. If not specified, a default value of 1000 will be +// used by the service. Regardless of the page_size value, the response +// may include a partial list and a caller should only rely on +// response's `next_page_token` to determine if there are more clusters +// left to be queried. +func (c *ProjectsLocationsClustersListCall) PageSize(pageSize int64) *ProjectsLocationsClustersListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The +// `next_page_token` value returned from a previous ListClusters +// request, if any. +func (c *ProjectsLocationsClustersListCall) PageToken(pageToken string) *ProjectsLocationsClustersListCall { + c.urlParams_.Set("pageToken", pageToken) + 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 *ProjectsLocationsClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersListCall { + 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 *ProjectsLocationsClustersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersListCall { + 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 *ProjectsLocationsClustersListCall) Context(ctx context.Context) *ProjectsLocationsClustersListCall { + 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 *ProjectsLocationsClustersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersListCall) 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/{+parent}/clusters") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "redis.projects.locations.clusters.list" call. +// Exactly one of *ListClustersResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListClustersResponse.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 *ProjectsLocationsClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, 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 := &ListClustersResponse{ + 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": "Lists all Redis clusters owned by a project in either the specified location (region) or all locations. The location should have the following format: * `projects/{project_id}/locations/{location_id}` If `location_id` is specified as `-` (wildcard), then all regions available to the project are queried, and the results are aggregated.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters", + // "httpMethod": "GET", + // "id": "redis.projects.locations.clusters.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of items to return. If not specified, a default value of 1000 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's `next_page_token` to determine if there are more clusters left to be queried.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The `next_page_token` value returned from a previous ListClusters request, if any.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the cluster location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/clusters", + // "response": { + // "$ref": "ListClustersResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsClustersListCall) Pages(ctx context.Context, f func(*ListClustersResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "redis.projects.locations.clusters.patch": + +type ProjectsLocationsClustersPatchCall struct { + s *Service + name string + cluster *Cluster + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the metadata and configuration of a specific Redis +// cluster. Completed longrunning.Operation will contain the new cluster +// object in the response field. The returned operation is automatically +// deleted after a few hours, so there is no need to call +// DeleteOperation. +// +// - name: Unique name of the resource in this scope including project +// and location using the form: +// `projects/{project_id}/locations/{location_id}/clusters/{cluster_id} +// `. +func (r *ProjectsLocationsClustersService) Patch(name string, cluster *Cluster) *ProjectsLocationsClustersPatchCall { + c := &ProjectsLocationsClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.cluster = cluster + return c +} + +// RequestId sets the optional parameter "requestId": Idempotent request +// UUID. +func (c *ProjectsLocationsClustersPatchCall) RequestId(requestId string) *ProjectsLocationsClustersPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// of fields to update. At least one path must be supplied in this +// field. The elements of the repeated paths field may only include +// these fields from Cluster: * `size_gb` * `replica_count` +func (c *ProjectsLocationsClustersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsClustersPatchCall { + c.urlParams_.Set("updateMask", updateMask) + 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 *ProjectsLocationsClustersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersPatchCall { + 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 *ProjectsLocationsClustersPatchCall) Context(ctx context.Context) *ProjectsLocationsClustersPatchCall { + 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 *ProjectsLocationsClustersPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersPatchCall) 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.cluster) + 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/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "redis.projects.locations.clusters.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsClustersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the metadata and configuration of a specific Redis cluster. Completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + // "httpMethod": "PATCH", + // "id": "redis.projects.locations.clusters.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Idempotent request UUID.", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from Cluster: * `size_gb` * `replica_count`", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Cluster" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "redis.projects.locations.instances.create": type ProjectsLocationsInstancesCreateCall struct { diff --git a/spanner/v1/spanner-api.json b/spanner/v1/spanner-api.json index a388c533eae..50f219a82cb 100644 --- a/spanner/v1/spanner-api.json +++ b/spanner/v1/spanner-api.json @@ -1831,7 +1831,7 @@ ] }, "batchWrite": { - "description": "Batches the supplied mutation groups in a collection of efficient transactions. All mutations in a group are committed atomically. However, mutations across groups can be committed non-atomically in an unspecified order and thus, they must be independent of each other. Partial failure is possible, i.e., some groups may have been committed successfully, while some may have failed. The results of individual batches are streamed into the response as the batches are applied. BatchWrite requests are not replay protected, meaning that each mutation group may be applied more than once. Replays of non-idempotent mutations may have undesirable effects. For example, replays of an insert mutation may produce an already exists error or result in additional rows if using generated or commit timestamp-based keys. We recommend structuring your mutation groups to be idempotent to avoid this issue.", + "description": "Batches the supplied mutation groups in a collection of efficient transactions. All mutations in a group are committed atomically. However, mutations across groups can be committed non-atomically in an unspecified order and thus, they must be independent of each other. Partial failure is possible, i.e., some groups may have been committed successfully, while some may have failed. The results of individual batches are streamed into the response as the batches are applied. BatchWrite requests are not replay protected, meaning that each mutation group may be applied more than once. Replays of non-idempotent mutations may have undesirable effects. For example, replays of an insert mutation may produce an already exists error or if you use generated or commit timestamp-based keys, it may result in additional rows being added to the mutation's table. We recommend structuring your mutation groups to be idempotent to avoid this issue.", "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:batchWrite", "httpMethod": "POST", "id": "spanner.projects.instances.databases.sessions.batchWrite", @@ -2594,7 +2594,7 @@ } } }, - "revision": "20230920", + "revision": "20230928", "rootUrl": "https://spanner.googleapis.com/", "schemas": { "Backup": { @@ -4561,7 +4561,7 @@ "description": "Additional options that affect how many partitions are created." }, "sql": { - "description": "Required. The query request to generate partitions for. The request will fail if the query is not root partitionable. The query plan of a root partitionable query has a single distributed union operator. A distributed union operator conceptually divides one or more tables into multiple splits, remotely evaluates a subquery independently on each split, and then unions all results. This must not contain DML commands, such as INSERT, UPDATE, or DELETE. Use ExecuteStreamingSql with a PartitionedDml transaction for large, partition-friendly DML operations.", + "description": "Required. The query request to generate partitions for. The request will fail if the query is not root partitionable. For a query to be root partitionable, it needs to satisfy a few conditions. For example, the first operator in the query execution plan must be a distributed union operator. For more information about other conditions, see [Read data in parallel](https://cloud.google.com/spanner/docs/reads#read_data_in_parallel). The query request must not contain DML commands, such as INSERT, UPDATE, or DELETE. Use ExecuteStreamingSql with a PartitionedDml transaction for large, partition-friendly DML operations.", "type": "string" }, "transaction": { diff --git a/spanner/v1/spanner-gen.go b/spanner/v1/spanner-gen.go index c9bbeac43e8..cc4faa99e26 100644 --- a/spanner/v1/spanner-gen.go +++ b/spanner/v1/spanner-gen.go @@ -3982,14 +3982,15 @@ type PartitionQueryRequest struct { PartitionOptions *PartitionOptions `json:"partitionOptions,omitempty"` // Sql: Required. The query request to generate partitions for. The - // request will fail if the query is not root partitionable. The query - // plan of a root partitionable query has a single distributed union - // operator. A distributed union operator conceptually divides one or - // more tables into multiple splits, remotely evaluates a subquery - // independently on each split, and then unions all results. This must - // not contain DML commands, such as INSERT, UPDATE, or DELETE. Use - // ExecuteStreamingSql with a PartitionedDml transaction for large, - // partition-friendly DML operations. + // request will fail if the query is not root partitionable. For a query + // to be root partitionable, it needs to satisfy a few conditions. For + // example, the first operator in the query execution plan must be a + // distributed union operator. For more information about other + // conditions, see Read data in parallel + // (https://cloud.google.com/spanner/docs/reads#read_data_in_parallel). + // The query request must not contain DML commands, such as INSERT, + // UPDATE, or DELETE. Use ExecuteStreamingSql with a PartitionedDml + // transaction for large, partition-friendly DML operations. Sql string `json:"sql,omitempty"` // Transaction: Read only snapshot transactions are supported, @@ -15152,9 +15153,10 @@ type ProjectsInstancesDatabasesSessionsBatchWriteCall struct { // replay protected, meaning that each mutation group may be applied // more than once. Replays of non-idempotent mutations may have // undesirable effects. For example, replays of an insert mutation may -// produce an already exists error or result in additional rows if using -// generated or commit timestamp-based keys. We recommend structuring -// your mutation groups to be idempotent to avoid this issue. +// produce an already exists error or if you use generated or commit +// timestamp-based keys, it may result in additional rows being added to +// the mutation's table. We recommend structuring your mutation groups +// to be idempotent to avoid this issue. // // - session: The session in which the batch request is to be run. func (r *ProjectsInstancesDatabasesSessionsService) BatchWrite(session string, batchwriterequest *BatchWriteRequest) *ProjectsInstancesDatabasesSessionsBatchWriteCall { @@ -15255,7 +15257,7 @@ func (c *ProjectsInstancesDatabasesSessionsBatchWriteCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Batches the supplied mutation groups in a collection of efficient transactions. All mutations in a group are committed atomically. However, mutations across groups can be committed non-atomically in an unspecified order and thus, they must be independent of each other. Partial failure is possible, i.e., some groups may have been committed successfully, while some may have failed. The results of individual batches are streamed into the response as the batches are applied. BatchWrite requests are not replay protected, meaning that each mutation group may be applied more than once. Replays of non-idempotent mutations may have undesirable effects. For example, replays of an insert mutation may produce an already exists error or result in additional rows if using generated or commit timestamp-based keys. We recommend structuring your mutation groups to be idempotent to avoid this issue.", + // "description": "Batches the supplied mutation groups in a collection of efficient transactions. All mutations in a group are committed atomically. However, mutations across groups can be committed non-atomically in an unspecified order and thus, they must be independent of each other. Partial failure is possible, i.e., some groups may have been committed successfully, while some may have failed. The results of individual batches are streamed into the response as the batches are applied. BatchWrite requests are not replay protected, meaning that each mutation group may be applied more than once. Replays of non-idempotent mutations may have undesirable effects. For example, replays of an insert mutation may produce an already exists error or if you use generated or commit timestamp-based keys, it may result in additional rows being added to the mutation's table. We recommend structuring your mutation groups to be idempotent to avoid this issue.", // "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:batchWrite", // "httpMethod": "POST", // "id": "spanner.projects.instances.databases.sessions.batchWrite", diff --git a/vmwareengine/v1/vmwareengine-api.json b/vmwareengine/v1/vmwareengine-api.json new file mode 100644 index 00000000000..2fe54e53f7d --- /dev/null +++ b/vmwareengine/v1/vmwareengine-api.json @@ -0,0 +1,3400 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://vmwareengine.googleapis.com/", + "batchPath": "batch", + "canonicalName": "VMware Engine", + "description": "The Google VMware Engine API lets you programmatically manage VMware environments.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/solutions/vmware-as-a-service", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "vmwareengine:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://vmwareengine.mtls.googleapis.com/", + "name": "vmwareengine", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "methods": { + "get": { + "description": "Gets information about a location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v1/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "networkPolicies": { + "methods": { + "create": { + "description": "Creates a new network policy in a given VMware Engine network of a project and location (region). A new network policy cannot be created if another network policy already exists in the same scope.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.networkPolicies.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "networkPolicyId": { + "description": "Required. The user-provided identifier of the network policy to be created. This identifier must be unique within parent `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the location (region) to create the new network policy in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/networkPolicies", + "request": { + "$ref": "NetworkPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a `NetworkPolicy` resource. A network policy cannot be deleted when `NetworkService.state` is set to `RECONCILING` for either its external IP or internet access service.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}", + "httpMethod": "DELETE", + "id": "vmwareengine.projects.locations.networkPolicies.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the network policy to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Retrieves a `NetworkPolicy` resource by its resource name.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.networkPolicies.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the network policy to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "NetworkPolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists `NetworkPolicy` resources in a specified project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.networkPolicies.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of network policies, you can exclude the ones named `example-policy` by specifying `name != \"example-policy\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-policy\") (createTime \u003e \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-policy-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-policy-2\") ```", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of network policies to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListNetworkPolicies` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListNetworkPolicies` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the location (region) to query for network policies. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/networkPolicies", + "response": { + "$ref": "ListNetworkPoliciesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Modifies a `NetworkPolicy` resource. Only the following fields can be updated: `internet_access`, `external_ip`, `edge_services_cidr`. Only fields specified in `updateMask` are applied. When updating a network policy, the external IP network service can only be disabled if there are no external IP addresses present in the scope of the policy. Also, a `NetworkService` cannot be updated when `NetworkService.state` is set to `RECONCILING`. During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}", + "httpMethod": "PATCH", + "id": "vmwareengine.projects.locations.networkPolicies.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the `NetworkPolicy` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "NetworkPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "nodeTypes": { + "methods": { + "get": { + "description": "Gets details of a single `NodeType`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodeTypes/{nodeTypesId}", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.nodeTypes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the node type to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/nodeTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "NodeType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists node types", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodeTypes", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.nodeTypes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of node types, you can exclude the ones named `standard-72` by specifying `name != \"standard-72\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"standard-72\") (virtual_cpu_count \u003e 2) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"standard-96\") AND (virtual_cpu_count \u003e 2) OR (name = \"standard-72\") ```", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of node types to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListNodeTypes` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListNodeTypes` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the location to be queried for node types. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/nodeTypes", + "response": { + "$ref": "ListNodeTypesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "operations": { + "methods": { + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "vmwareengine.projects.locations.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "privateClouds": { + "methods": { + "create": { + "description": "Creates a new `PrivateCloud` resource in a given project and location. Private clouds of type `STANDARD` and `TIME_LIMITED` are zonal resources, `STRETCHED` private clouds are regional. Creating a private cloud also creates a [management cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) for that private cloud.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.privateClouds.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the location to create the new private cloud in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "privateCloudId": { + "description": "Required. The user-provided identifier of the private cloud to be created. This identifier must be unique among each `PrivateCloud` within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + "location": "query", + "type": "string" + }, + "requestId": { + "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. True if you want the request to be validated and not executed; false otherwise.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/privateClouds", + "request": { + "$ref": "PrivateCloud" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Schedules a `PrivateCloud` resource for deletion. A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` set to `DELETED` and `expireTime` set to the time when deletion is final and can no longer be reversed. The delete operation is marked as done as soon as the `PrivateCloud` is successfully scheduled for deletion (this also applies when `delayHours` is set to zero), and the operation is not kept in pending state until `PrivateCloud` is purged. `PrivateCloud` can be restored using `UndeletePrivateCloud` method before the `expireTime` elapses. When `expireTime` is reached, deletion is final and all private cloud resources are irreversibly removed and billing stops. During the final removal process, `PrivateCloud.state` is set to `PURGING`. `PrivateCloud` can be polled using standard `GET` method for the whole period of deletion and purging. It will not be returned only when it is completely purged.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}", + "httpMethod": "DELETE", + "id": "vmwareengine.projects.locations.privateClouds.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "delayHours": { + "description": "Optional. Time delay of the deletion specified in hours. The default value is `3`. Specifying a non-zero value for this field changes the value of `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned deletion time. Deletion can be cancelled before `expire_time` elapses using VmwareEngine.UndeletePrivateCloud. Specifying a value of `0` for this field instead begins the deletion process and ceases billing immediately. During the final deletion process, the value of `PrivateCloud.state` becomes `PURGING`.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "force": { + "description": "Optional. If set to true, cascade delete is enabled and all children of this private cloud resource are also deleted. When this flag is set to false, the private cloud will not be deleted if there are any children other than the management cluster. The management cluster is always deleted.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. The resource name of the private cloud to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Retrieves a `PrivateCloud` resource by its resource name.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the private cloud to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "PrivateCloud" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "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/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:getIamPolicy", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.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": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists `PrivateCloud` resources in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of private clouds, you can exclude the ones named `example-pc` by specifying `name != \"example-pc\"`. You can also filter nested fields. For example, you could specify `networkConfig.managementCidr = \"192.168.0.0/24\"` to include private clouds only if they have a matching address in their network configuration. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-pc\") (createTime \u003e \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"private-cloud-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"private-cloud-2\") ```", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of private clouds to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListPrivateClouds` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPrivateClouds` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the private cloud to be queried for clusters. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/privateClouds", + "response": { + "$ref": "ListPrivateCloudsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Modifies a `PrivateCloud` resource. Only the following fields can be updated: `description`. Only fields specified in `updateMask` are applied. During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}", + "httpMethod": "PATCH", + "id": "vmwareengine.projects.locations.privateClouds.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of this private cloud. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the `PrivateCloud` resource by the update. The fields specified in `updateMask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "PrivateCloud" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "resetNsxCredentials": { + "description": "Resets credentials of the NSX appliance.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:resetNsxCredentials", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.privateClouds.resetNsxCredentials", + "parameterOrder": [ + "privateCloud" + ], + "parameters": { + "privateCloud": { + "description": "Required. The resource name of the private cloud to reset credentials for. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+privateCloud}:resetNsxCredentials", + "request": { + "$ref": "ResetNsxCredentialsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "resetVcenterCredentials": { + "description": "Resets credentials of the Vcenter appliance.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:resetVcenterCredentials", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.privateClouds.resetVcenterCredentials", + "parameterOrder": [ + "privateCloud" + ], + "parameters": { + "privateCloud": { + "description": "Required. The resource name of the private cloud to reset credentials for. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+privateCloud}:resetVcenterCredentials", + "request": { + "$ref": "ResetVcenterCredentialsRequest" + }, + "response": { + "$ref": "Operation" + }, + "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/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:setIamPolicy", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.privateClouds.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/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "showNsxCredentials": { + "description": "Gets details of credentials for NSX appliance.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:showNsxCredentials", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.showNsxCredentials", + "parameterOrder": [ + "privateCloud" + ], + "parameters": { + "privateCloud": { + "description": "Required. The resource name of the private cloud to be queried for credentials. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+privateCloud}:showNsxCredentials", + "response": { + "$ref": "Credentials" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "showVcenterCredentials": { + "description": "Gets details of credentials for Vcenter appliance.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:showVcenterCredentials", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.showVcenterCredentials", + "parameterOrder": [ + "privateCloud" + ], + "parameters": { + "privateCloud": { + "description": "Required. The resource name of the private cloud to be queried for credentials. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+privateCloud}:showVcenterCredentials", + "response": { + "$ref": "Credentials" + }, + "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/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:testIamPermissions", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.privateClouds.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/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "undelete": { + "description": "Restores a private cloud that was previously scheduled for deletion by `DeletePrivateCloud`. A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` set to `DELETED` and `PrivateCloud.expireTime` set to the time when deletion can no longer be reversed.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:undelete", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.privateClouds.undelete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the private cloud scheduled for deletion. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:undelete", + "request": { + "$ref": "UndeletePrivateCloudRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "clusters": { + "methods": { + "create": { + "description": "Creates a new cluster in a given private cloud. Creating a new cluster provides additional nodes for use in the parent private cloud and requires sufficient [node quota](https://cloud.google.com/vmware-engine/quotas).", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.privateClouds.clusters.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "clusterId": { + "description": "Required. The user-provided identifier of the new `Cluster`. This identifier must be unique among clusters within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the private cloud to create a new cluster in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. True if you want the request to be validated and not executed; false otherwise.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+parent}/clusters", + "request": { + "$ref": "Cluster" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a `Cluster` resource. To avoid unintended data loss, migrate or gracefully shut down any workloads running on the cluster before deletion. You cannot delete the management cluster of a private cloud using this method.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}", + "httpMethod": "DELETE", + "id": "vmwareengine.projects.locations.privateClouds.clusters.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the cluster to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Retrieves a `Cluster` resource by its resource name.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.clusters.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The cluster resource name to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Cluster" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "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/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}:getIamPolicy", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.clusters.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": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists `Cluster` resources in a given private cloud.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.clusters.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": " To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-cluster\") (nodeCount = \"3\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-cluster-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-cluster-2\") ```", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of clusters to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListClusters` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListClusters` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the private cloud to query for clusters. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/clusters", + "response": { + "$ref": "ListClustersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Modifies a `Cluster` resource. Only fields specified in `updateMask` are applied. During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}", + "httpMethod": "PATCH", + "id": "vmwareengine.projects.locations.privateClouds.clusters.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of this cluster. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the `Cluster` resource by the update. The fields specified in the `updateMask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. True if you want the request to be validated and not executed; false otherwise.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Cluster" + }, + "response": { + "$ref": "Operation" + }, + "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/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}:setIamPolicy", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.privateClouds.clusters.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/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "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/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}:testIamPermissions", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.privateClouds.clusters.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/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "hcxActivationKeys": { + "methods": { + "create": { + "description": "Creates a new HCX activation key in a given private cloud.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "hcxActivationKeyId": { + "description": "Required. The user-provided identifier of the `HcxActivationKey` to be created. This identifier must be unique among `HcxActivationKey` resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the private cloud to create the key for. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/hcxActivationKeys", + "request": { + "$ref": "HcxActivationKey" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Retrieves a `HcxActivationKey` resource by its resource name.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the HCX activation key to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "HcxActivationKey" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "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/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}:getIamPolicy", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.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": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists `HcxActivationKey` resources in a given private cloud.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of HCX activation keys to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListHcxActivationKeys` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListHcxActivationKeys` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the private cloud to be queried for HCX activation keys. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/hcxActivationKeys", + "response": { + "$ref": "ListHcxActivationKeysResponse" + }, + "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/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}:setIamPolicy", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.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/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "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/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}:testIamPermissions", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.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/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "subnets": { + "methods": { + "get": { + "description": "Gets details of a single subnet.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/subnets/{subnetsId}", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.subnets.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the subnet to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/subnets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Subnet" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists subnets in a given private cloud.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/subnets", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateClouds.subnets.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of subnets to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListSubnetsRequest` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSubnetsRequest` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the private cloud to be queried for subnets. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/subnets", + "response": { + "$ref": "ListSubnetsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single subnet. Only fields specified in `update_mask` are applied. *Note*: This API is synchronous and always returns a successful `google.longrunning.Operation` (LRO). The returned LRO will only have `done` and `response` fields.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/subnets/{subnetsId}", + "httpMethod": "PATCH", + "id": "vmwareengine.projects.locations.privateClouds.subnets.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of this subnet. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/subnets/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the `Subnet` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Subnet" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "privateConnections": { + "methods": { + "create": { + "description": "Creates a new private connection that can be used for accessing private Clouds.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.privateConnections.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the location to create the new private connection in. Private connection is a regional resource. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "privateConnectionId": { + "description": "Required. The user-provided identifier of the new private connection. This identifier must be unique among private connection resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + "location": "query", + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/privateConnections", + "request": { + "$ref": "PrivateConnection" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a `PrivateConnection` resource. When a private connection is deleted for a VMware Engine network, the connected network becomes inaccessible to that VMware Engine network.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections/{privateConnectionsId}", + "httpMethod": "DELETE", + "id": "vmwareengine.projects.locations.privateConnections.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the private connection to be deleted. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateConnections/my-connection`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateConnections/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Retrieves a `PrivateConnection` resource by its resource name. The resource contains details of the private connection, such as connected network, routing mode and state.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections/{privateConnectionsId}", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateConnections.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the private connection to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateConnections/my-connection`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateConnections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "PrivateConnection" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists `PrivateConnection` resources in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateConnections.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of private connections, you can exclude the ones named `example-connection` by specifying `name != \"example-connection\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-connection\") (createTime \u003e \"2022-09-22T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-connection-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-connection-2\") ```", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of private connections to return in one page. The maximum value is coerced to 1000. The default value of this field is 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListPrivateConnections` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPrivateConnections` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the location to query for private connections. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/privateConnections", + "response": { + "$ref": "ListPrivateConnectionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Modifies a `PrivateConnection` resource. Only `description` and `routing_mode` fields can be updated. Only fields specified in `updateMask` are applied.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections/{privateConnectionsId}", + "httpMethod": "PATCH", + "id": "vmwareengine.projects.locations.privateConnections.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of the private connection. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateConnections/my-connection`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateConnections/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the `PrivateConnection` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "PrivateConnection" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "peeringRoutes": { + "methods": { + "list": { + "description": "Lists the private connection routes exchanged over a peering connection.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections/{privateConnectionsId}/peeringRoutes", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.privateConnections.peeringRoutes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of peering routes to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListPrivateConnectionPeeringRoutes` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPrivateConnectionPeeringRoutes` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the private connection to retrieve peering routes from. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-west1/privateConnections/my-connection`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/privateConnections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/peeringRoutes", + "response": { + "$ref": "ListPrivateConnectionPeeringRoutesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "vmwareEngineNetworks": { + "methods": { + "create": { + "description": "Creates a new VMware Engine network that can be used by a private cloud.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/vmwareEngineNetworks", + "httpMethod": "POST", + "id": "vmwareengine.projects.locations.vmwareEngineNetworks.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the location to create the new VMware Engine network in. A VMware Engine network of type `LEGACY` is a regional resource, and a VMware Engine network of type `STANDARD` is a global resource. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "vmwareEngineNetworkId": { + "description": "Required. The user-provided identifier of the new VMware Engine network. This identifier must be unique among VMware Engine network resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * For networks of type LEGACY, adheres to the format: `{region-id}-default`. Replace `{region-id}` with the region where you want to create the VMware Engine network. For example, \"us-central1-default\". * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/vmwareEngineNetworks", + "request": { + "$ref": "VmwareEngineNetwork" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a `VmwareEngineNetwork` resource. You can only delete a VMware Engine network after all resources that refer to it are deleted. For example, a private cloud, a network peering, and a network policy can all refer to the same VMware Engine network.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/vmwareEngineNetworks/{vmwareEngineNetworksId}", + "httpMethod": "DELETE", + "id": "vmwareengine.projects.locations.vmwareEngineNetworks.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "Optional. Checksum used to ensure that the user-provided value is up to date before the server processes the request. The server compares provided checksum with the current checksum of the resource. If the user-provided value is out of date, this request returns an `ABORTED` error.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The resource name of the VMware Engine network to be deleted. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/vmwareEngineNetworks/my-network`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/vmwareEngineNetworks/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Retrieves a `VmwareEngineNetwork` resource by its resource name. The resource contains details of the VMware Engine network, such as its VMware Engine network type, peered networks in a service project, and state (for example, `CREATING`, `ACTIVE`, `DELETING`).", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/vmwareEngineNetworks/{vmwareEngineNetworksId}", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.vmwareEngineNetworks.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the VMware Engine network to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/vmwareEngineNetworks/my-network`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/vmwareEngineNetworks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "VmwareEngineNetwork" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists `VmwareEngineNetwork` resources in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/vmwareEngineNetworks", + "httpMethod": "GET", + "id": "vmwareengine.projects.locations.vmwareEngineNetworks.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of network peerings, you can exclude the ones named `example-network` by specifying `name != \"example-network\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-network\") (createTime \u003e \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-network-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-network-2\") ```", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return in one page. The maximum value is coerced to 1000. The default value of this field is 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListVmwareEngineNetworks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListVmwareEngineNetworks` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the location to query for VMware Engine networks. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/vmwareEngineNetworks", + "response": { + "$ref": "ListVmwareEngineNetworksResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Modifies a VMware Engine network resource. Only the following fields can be updated: `description`. Only fields specified in `updateMask` are applied.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/vmwareEngineNetworks/{vmwareEngineNetworksId}", + "httpMethod": "PATCH", + "id": "vmwareengine.projects.locations.vmwareEngineNetworks.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of the VMware Engine network. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/vmwareEngineNetworks/my-network`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/vmwareEngineNetworks/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Field mask is used to specify the fields to be overwritten in the VMware Engine network resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. Only the following fields can be updated: `description`.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "VmwareEngineNetwork" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20230922", + "rootUrl": "https://vmwareengine.googleapis.com/", + "schemas": { + "AuditConfig": { + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.", + "id": "AuditConfig", + "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", + "type": "string" + } + }, + "type": "object" + }, + "AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", + "id": "AuditLogConfig", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "type": "string" + } + }, + "type": "object" + }, + "Binding": { + "description": "Associates `members`, or principals, with a `role`.", + "id": "Binding", + "properties": { + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "type": "string" + } + }, + "type": "object" + }, + "Cluster": { + "description": "A cluster in a private cloud.", + "id": "Cluster", + "properties": { + "createTime": { + "description": "Output only. Creation time of this resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "management": { + "description": "Output only. True if the cluster is a management cluster; false otherwise. There can only be one management cluster in a private cloud and it has to be the first one.", + "readOnly": true, + "type": "boolean" + }, + "name": { + "description": "Output only. The resource name of this cluster. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", + "readOnly": true, + "type": "string" + }, + "nodeTypeConfigs": { + "additionalProperties": { + "$ref": "NodeTypeConfig" + }, + "description": "Required. The map of cluster node types in this cluster, where the key is canonical identifier of the node type (corresponds to the `NodeType`).", + "type": "object" + }, + "state": { + "description": "Output only. State of the resource.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "CREATING", + "UPDATING", + "DELETING", + "REPAIRING" + ], + "enumDescriptions": [ + "The default value. This value should never be used.", + "The Cluster is operational and can be used by the user.", + "The Cluster is being deployed.", + "Adding or removing of a node to the cluster, any other cluster specific updates.", + "The Cluster is being deleted.", + "The Cluster is undergoing maintenance, for example: a failed node is getting replaced." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. System-generated unique identifier for the resource.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Last update time of this resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Credentials": { + "description": "Credentials for a private cloud.", + "id": "Credentials", + "properties": { + "password": { + "description": "Initial password.", + "type": "string" + }, + "username": { + "description": "Initial username.", + "type": "string" + } + }, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "Expr": { + "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", + "id": "Expr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + }, + "Hcx": { + "description": "Details about a HCX Cloud Manager appliance.", + "id": "Hcx", + "properties": { + "fqdn": { + "description": "Fully qualified domain name of the appliance.", + "type": "string" + }, + "internalIp": { + "description": "Internal IP address of the appliance.", + "type": "string" + }, + "state": { + "description": "Output only. The state of the appliance.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "CREATING" + ], + "enumDescriptions": [ + "Unspecified appliance state. This is the default value.", + "The appliance is operational and can be used.", + "The appliance is being deployed." + ], + "readOnly": true, + "type": "string" + }, + "version": { + "description": "Version of the appliance.", + "type": "string" + } + }, + "type": "object" + }, + "HcxActivationKey": { + "description": "HCX activation key. A default key is created during private cloud provisioning, but this behavior is subject to change and you should always verify active keys. Use VmwareEngine.ListHcxActivationKeys to retrieve existing keys and VmwareEngine.CreateHcxActivationKey to create new ones.", + "id": "HcxActivationKey", + "properties": { + "activationKey": { + "description": "Output only. HCX activation key.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. Creation time of HCX activation key.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The resource name of this HcxActivationKey. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key`", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. State of HCX activation key.", + "enum": [ + "STATE_UNSPECIFIED", + "AVAILABLE", + "CONSUMED", + "CREATING" + ], + "enumDescriptions": [ + "Unspecified state.", + "State of a newly generated activation key.", + "State of key when it has been used to activate HCX appliance.", + "State of key when it is being created." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. System-generated unique identifier for the resource.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ListClustersResponse": { + "description": "Response message for VmwareEngine.ListClusters", + "id": "ListClustersResponse", + "properties": { + "clusters": { + "description": "A list of private cloud clusters.", + "items": { + "$ref": "Cluster" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached when making an aggregated query using wildcards.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListHcxActivationKeysResponse": { + "description": "Response message for VmwareEngine.ListHcxActivationKeys", + "id": "ListHcxActivationKeysResponse", + "properties": { + "hcxActivationKeys": { + "description": "List of HCX activation keys.", + "items": { + "$ref": "HcxActivationKey" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached when making an aggregated query using wildcards.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "ListNetworkPoliciesResponse": { + "description": "Response message for VmwareEngine.ListNetworkPolicies", + "id": "ListNetworkPoliciesResponse", + "properties": { + "networkPolicies": { + "description": "A list of network policies.", + "items": { + "$ref": "NetworkPolicy" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be send as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached when making an aggregated query using wildcards.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListNodeTypesResponse": { + "description": "Response message for VmwareEngine.ListNodeTypes", + "id": "ListNodeTypesResponse", + "properties": { + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "nodeTypes": { + "description": "A list of Node Types.", + "items": { + "$ref": "NodeType" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached when making an aggregated query using wildcards.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "ListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListPrivateCloudsResponse": { + "description": "Response message for VmwareEngine.ListPrivateClouds", + "id": "ListPrivateCloudsResponse", + "properties": { + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "privateClouds": { + "description": "A list of private clouds.", + "items": { + "$ref": "PrivateCloud" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached when making an aggregated query using wildcards.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListPrivateConnectionPeeringRoutesResponse": { + "description": "Response message for VmwareEngine.ListPrivateConnectionPeeringRoutes", + "id": "ListPrivateConnectionPeeringRoutesResponse", + "properties": { + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "peeringRoutes": { + "description": "A list of peering routes.", + "items": { + "$ref": "PeeringRoute" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListPrivateConnectionsResponse": { + "description": "Response message for VmwareEngine.ListPrivateConnections", + "id": "ListPrivateConnectionsResponse", + "properties": { + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "privateConnections": { + "description": "A list of private connections.", + "items": { + "$ref": "PrivateConnection" + }, + "type": "array" + }, + "unreachable": { + "description": "Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListSubnetsResponse": { + "description": "Response message for VmwareEngine.ListSubnets", + "id": "ListSubnetsResponse", + "properties": { + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "subnets": { + "description": "A list of subnets.", + "items": { + "$ref": "Subnet" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached when making an aggregated query using wildcards.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListVmwareEngineNetworksResponse": { + "description": "Response message for VmwareEngine.ListVmwareEngineNetworks", + "id": "ListVmwareEngineNetworksResponse", + "properties": { + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "unreachable": { + "description": "Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "vmwareEngineNetworks": { + "description": "A list of VMware Engine networks.", + "items": { + "$ref": "VmwareEngineNetwork" + }, + "type": "array" + } + }, + "type": "object" + }, + "Location": { + "description": "A resource that represents a Google Cloud location.", + "id": "Location", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, + "ManagementCluster": { + "description": "Management cluster configuration.", + "id": "ManagementCluster", + "properties": { + "clusterId": { + "description": "Required. The user-provided identifier of the new `Cluster`. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + "type": "string" + }, + "nodeTypeConfigs": { + "additionalProperties": { + "$ref": "NodeTypeConfig" + }, + "description": "Required. The map of cluster node types in this cluster, where the key is canonical identifier of the node type (corresponds to the `NodeType`).", + "type": "object" + } + }, + "type": "object" + }, + "NetworkConfig": { + "description": "Network configuration in the consumer project with which the peering has to be done.", + "id": "NetworkConfig", + "properties": { + "managementCidr": { + "description": "Required. Management CIDR used by VMware management appliances.", + "type": "string" + }, + "managementIpAddressLayoutVersion": { + "description": "Output only. The IP address layout version of the management IP address range. Possible versions include: * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address layout used by some existing private clouds. This is no longer supported for new private clouds as it does not support all features. * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address layout used by all newly created private clouds. This version supports all current features.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "vmwareEngineNetwork": { + "description": "Optional. The relative resource name of the VMware Engine network attached to the private cloud. Specify the name in the following form: `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` where `{project}` can either be a project number or a project ID.", + "type": "string" + }, + "vmwareEngineNetworkCanonical": { + "description": "Output only. The canonical name of the VMware Engine network in the form: `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "NetworkPolicy": { + "description": "Represents a network policy resource. Network policies are regional resources. You can use a network policy to enable or disable internet access and external IP access. Network policies are associated with a VMware Engine network, which might span across regions. For a given region, a network policy applies to all private clouds in the VMware Engine network associated with the policy.", + "id": "NetworkPolicy", + "properties": { + "createTime": { + "description": "Output only. Creation time of this resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. User-provided description for this network policy.", + "type": "string" + }, + "edgeServicesCidr": { + "description": "Required. IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a \"/26\" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.", + "type": "string" + }, + "externalIp": { + "$ref": "NetworkService", + "description": "Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when `internet_access` is also enabled." + }, + "internetAccess": { + "$ref": "NetworkService", + "description": "Network service that allows VMware workloads to access the internet." + }, + "name": { + "description": "Output only. The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`", + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. System-generated unique identifier for the resource.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Last update time of this resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "vmwareEngineNetwork": { + "description": "Optional. The relative resource name of the VMware Engine network. Specify the name in the following form: `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` where `{project}` can either be a project number or a project ID.", + "type": "string" + }, + "vmwareEngineNetworkCanonical": { + "description": "Output only. The canonical name of the VMware Engine network in the form: `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "NetworkService": { + "description": "Represents a network service that is managed by a `NetworkPolicy` resource. A network service provides a way to control an aspect of external access to VMware workloads. For example, whether the VMware workloads in the private clouds governed by a network policy can access or be accessed from the internet.", + "id": "NetworkService", + "properties": { + "enabled": { + "description": "True if the service is enabled; false otherwise.", + "type": "boolean" + }, + "state": { + "description": "Output only. State of the service. New values may be added to this enum when appropriate.", + "enum": [ + "STATE_UNSPECIFIED", + "UNPROVISIONED", + "RECONCILING", + "ACTIVE" + ], + "enumDescriptions": [ + "Unspecified service state. This is the default value.", + "Service is not provisioned.", + "Service is in the process of being provisioned/deprovisioned.", + "Service is active." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "NodeType": { + "description": "Describes node type.", + "id": "NodeType", + "properties": { + "availableCustomCoreCounts": { + "description": "Output only. List of possible values of custom core count.", + "items": { + "format": "int32", + "type": "integer" + }, + "readOnly": true, + "type": "array" + }, + "diskSizeGb": { + "description": "Output only. The amount of storage available, defined in GB.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "displayName": { + "description": "Output only. The friendly name for this node type. For example: ve1-standard-72", + "readOnly": true, + "type": "string" + }, + "memoryGb": { + "description": "Output only. The amount of physical memory available, defined in GB.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "name": { + "description": "Output only. The resource name of this node type. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`", + "readOnly": true, + "type": "string" + }, + "nodeTypeId": { + "description": "Output only. The canonical identifier of the node type (corresponds to the `NodeType`). For example: standard-72.", + "readOnly": true, + "type": "string" + }, + "totalCoreCount": { + "description": "Output only. The total number of CPU cores in a single node.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "virtualCpuCount": { + "description": "Output only. The total number of virtual CPUs in a single node.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, + "NodeTypeConfig": { + "description": "Information about the type and number of nodes associated with the cluster.", + "id": "NodeTypeConfig", + "properties": { + "customCoreCount": { + "description": "Optional. Customized number of cores available to each node of the type. This number must always be one of `nodeType.availableCustomCoreCounts`. If zero is provided max value from `nodeType.availableCustomCoreCounts` will be used.", + "format": "int32", + "type": "integer" + }, + "nodeCount": { + "description": "Required. The number of nodes of this type in the cluster", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "Nsx": { + "description": "Details about a NSX Manager appliance.", + "id": "Nsx", + "properties": { + "fqdn": { + "description": "Fully qualified domain name of the appliance.", + "type": "string" + }, + "internalIp": { + "description": "Internal IP address of the appliance.", + "type": "string" + }, + "state": { + "description": "Output only. The state of the appliance.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "CREATING" + ], + "enumDescriptions": [ + "Unspecified appliance state. This is the default value.", + "The appliance is operational and can be used.", + "The appliance is being deployed." + ], + "readOnly": true, + "type": "string" + }, + "version": { + "description": "Version of the appliance.", + "type": "string" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "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" + } + }, + "type": "object" + }, + "OperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. True if the user has requested cancellation of the operation; false otherwise. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "PeeringRoute": { + "description": "Exchanged network peering route.", + "id": "PeeringRoute", + "properties": { + "destRange": { + "description": "Output only. Destination range of the peering route in CIDR notation.", + "readOnly": true, + "type": "string" + }, + "direction": { + "description": "Output only. Direction of the routes exchanged with the peer network, from the VMware Engine network perspective: * Routes of direction `INCOMING` are imported from the peer network. * Routes of direction `OUTGOING` are exported from the intranet VPC network of the VMware Engine network.", + "enum": [ + "DIRECTION_UNSPECIFIED", + "INCOMING", + "OUTGOING" + ], + "enumDescriptions": [ + "Unspecified exchanged routes direction. This is default.", + "Routes imported from the peer network.", + "Routes exported to the peer network." + ], + "readOnly": true, + "type": "string" + }, + "imported": { + "description": "Output only. True if the peering route has been imported from a peered VPC network; false otherwise. The import happens if the field `NetworkPeering.importCustomRoutes` is true for this network, `NetworkPeering.exportCustomRoutes` is true for the peer VPC network, and the import does not result in a route conflict.", + "readOnly": true, + "type": "boolean" + }, + "nextHopRegion": { + "description": "Output only. Region containing the next hop of the peering route. This field only applies to dynamic routes in the peer VPC network.", + "readOnly": true, + "type": "string" + }, + "priority": { + "description": "Output only. The priority of the peering route.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Output only. Type of the route in the peer VPC network.", + "enum": [ + "TYPE_UNSPECIFIED", + "DYNAMIC_PEERING_ROUTE", + "STATIC_PEERING_ROUTE", + "SUBNET_PEERING_ROUTE" + ], + "enumDescriptions": [ + "Unspecified peering route type. This is the default value.", + "Dynamic routes in the peer network.", + "Static routes in the peer network.", + "Created, updated, and removed automatically by Google Cloud when subnets are created, modified, or deleted in the peer network." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "id": "Policy", + "properties": { + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.", + "items": { + "$ref": "Binding" + }, + "type": "array" + }, + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. 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", + "type": "integer" + } + }, + "type": "object" + }, + "PrivateCloud": { + "description": "Represents a private cloud resource. Private clouds of type `STANDARD` and `TIME_LIMITED` are zonal resources, `STRETCHED` private clouds are regional.", + "id": "PrivateCloud", + "properties": { + "createTime": { + "description": "Output only. Creation time of this resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "deleteTime": { + "description": "Output only. Time when the resource was scheduled for deletion.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "User-provided description for this private cloud.", + "type": "string" + }, + "expireTime": { + "description": "Output only. Time when the resource will be irreversibly deleted.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "hcx": { + "$ref": "Hcx", + "description": "Output only. HCX appliance.", + "readOnly": true + }, + "managementCluster": { + "$ref": "ManagementCluster", + "description": "Required. Input only. The management cluster for this private cloud. This field is required during creation of the private cloud to provide details for the default cluster. The following fields can't be changed after private cloud creation: `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`." + }, + "name": { + "description": "Output only. The resource name of this private cloud. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + "readOnly": true, + "type": "string" + }, + "networkConfig": { + "$ref": "NetworkConfig", + "description": "Required. Network configuration of the private cloud." + }, + "nsx": { + "$ref": "Nsx", + "description": "Output only. NSX appliance.", + "readOnly": true + }, + "state": { + "description": "Output only. State of the resource. New values may be added to this enum when appropriate.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "CREATING", + "UPDATING", + "FAILED", + "DELETED", + "PURGING" + ], + "enumDescriptions": [ + "The default value. This value should never be used.", + "The private cloud is ready.", + "The private cloud is being created.", + "The private cloud is being updated.", + "The private cloud is in failed state.", + "The private cloud is scheduled for deletion. The deletion process can be cancelled by using the corresponding undelete method.", + "The private cloud is irreversibly deleted and is being removed from the system." + ], + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Optional. Type of the private cloud. Defaults to STANDARD.", + "enum": [ + "STANDARD", + "TIME_LIMITED" + ], + "enumDescriptions": [ + "Standard private is a zonal resource, with 3+ nodes. Default type.", + "Time limited private cloud is a zonal resource, can have only 1 node and has limited life span. Will be deleted after defined period of time, can be converted into standard private cloud by expanding it up to 3 or more nodes." + ], + "type": "string" + }, + "uid": { + "description": "Output only. System-generated unique identifier for the resource.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Last update time of this resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "vcenter": { + "$ref": "Vcenter", + "description": "Output only. Vcenter appliance.", + "readOnly": true + } + }, + "type": "object" + }, + "PrivateConnection": { + "description": "Private connection resource that provides connectivity for VMware Engine private clouds.", + "id": "PrivateConnection", + "properties": { + "createTime": { + "description": "Output only. Creation time of this resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. User-provided description for this private connection.", + "type": "string" + }, + "name": { + "description": "Output only. The resource name of the private connection. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateConnections/my-connection`", + "readOnly": true, + "type": "string" + }, + "peeringId": { + "description": "Output only. VPC network peering id between given network VPC and VMwareEngineNetwork.", + "readOnly": true, + "type": "string" + }, + "peeringState": { + "description": "Output only. Peering state between service network and VMware Engine network.", + "enum": [ + "PEERING_STATE_UNSPECIFIED", + "PEERING_ACTIVE", + "PEERING_INACTIVE" + ], + "enumDescriptions": [ + "The default value. This value is used if the peering state is omitted or unknown.", + "The peering is in active state.", + "The peering is in inactive state." + ], + "readOnly": true, + "type": "string" + }, + "routingMode": { + "description": "Optional. Routing Mode. Default value is set to GLOBAL. For type = PRIVATE_SERVICE_ACCESS, this field can be set to GLOBAL or REGIONAL, for other types only GLOBAL is supported.", + "enum": [ + "ROUTING_MODE_UNSPECIFIED", + "GLOBAL", + "REGIONAL" + ], + "enumDescriptions": [ + "The default value. This value should never be used.", + "Global Routing Mode", + "Regional Routing Mode" + ], + "type": "string" + }, + "serviceNetwork": { + "description": "Required. Service network to create private connection. Specify the name in the following form: `projects/{project}/global/networks/{network_id}` For type = PRIVATE_SERVICE_ACCESS, this field represents servicenetworking VPC, e.g. projects/project-tp/global/networks/servicenetworking. For type = NETAPP_CLOUD_VOLUME, this field represents NetApp service VPC, e.g. projects/project-tp/global/networks/netapp-tenant-vpc. For type = DELL_POWERSCALE, this field represent Dell service VPC, e.g. projects/project-tp/global/networks/dell-tenant-vpc. For type= THIRD_PARTY_SERVICE, this field could represent a consumer VPC or any other producer VPC to which the VMware Engine Network needs to be connected, e.g. projects/project/global/networks/vpc.", + "type": "string" + }, + "state": { + "description": "Output only. State of the private connection.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "UPDATING", + "DELETING", + "UNPROVISIONED", + "FAILED" + ], + "enumDescriptions": [ + "The default value. This value is used if the state is omitted.", + "The private connection is being created.", + "The private connection is ready.", + "The private connection is being updated.", + "The private connection is being deleted.", + "The private connection is not provisioned, since no private cloud is present for which this private connection is needed.", + "The private connection is in failed state." + ], + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Required. Private connection type.", + "enum": [ + "TYPE_UNSPECIFIED", + "PRIVATE_SERVICE_ACCESS", + "NETAPP_CLOUD_VOLUMES", + "DELL_POWERSCALE", + "THIRD_PARTY_SERVICE" + ], + "enumDescriptions": [ + "The default value. This value should never be used.", + "Connection used for establishing [private services access](https://cloud.google.com/vpc/docs/private-services-access).", + "Connection used for connecting to NetApp Cloud Volumes.", + "Connection used for connecting to Dell PowerScale.", + "Connection used for connecting to third-party services." + ], + "type": "string" + }, + "uid": { + "description": "Output only. System-generated unique identifier for the resource.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Last update time of this resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "vmwareEngineNetwork": { + "description": "Required. The relative resource name of Legacy VMware Engine network. Specify the name in the following form: `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` where `{project}`, `{location}` will be same as specified in private connection resource name and `{vmware_engine_network_id}` will be in the form of `{location}`-default e.g. projects/project/locations/us-central1/vmwareEngineNetworks/us-central1-default.", + "type": "string" + }, + "vmwareEngineNetworkCanonical": { + "description": "Output only. The canonical name of the VMware Engine network in the form: `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ResetNsxCredentialsRequest": { + "description": "Request message for VmwareEngine.ResetNsxCredentials", + "id": "ResetNsxCredentialsRequest", + "properties": { + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + } + }, + "type": "object" + }, + "ResetVcenterCredentialsRequest": { + "description": "Request message for VmwareEngine.ResetVcenterCredentials", + "id": "ResetVcenterCredentialsRequest", + "properties": { + "requestId": { + "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + } + }, + "type": "object" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "id": "SetIamPolicyRequest", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." + }, + "updateMask": { + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: \"bindings, etag\"`", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "Subnet": { + "description": "Subnet in a private cloud. Either `management` subnets (such as vMotion) that are read-only, or `userDefined`, which can also be updated.", + "id": "Subnet", + "properties": { + "gatewayIp": { + "description": "The IP address of the gateway of this subnet. Must fall within the IP prefix defined above.", + "type": "string" + }, + "ipCidrRange": { + "description": "The IP address range of the subnet in CIDR format '10.0.0.0/24'.", + "type": "string" + }, + "name": { + "description": "Output only. The resource name of this subnet. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The state of the resource.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "CREATING", + "UPDATING", + "DELETING", + "RECONCILING", + "FAILED" + ], + "enumDescriptions": [ + "The default value. This value should never be used.", + "The subnet is ready.", + "The subnet is being created.", + "The subnet is being updated.", + "The subnet is being deleted.", + "Changes requested in the last operation are being propagated.", + "Last operation on the subnet did not succeed. Subnet's payload is reverted back to its most recent working state." + ], + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Output only. The type of the subnet. For example \"management\" or \"userDefined\".", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "id": "TestIamPermissionsRequest", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "id": "TestIamPermissionsResponse", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "UndeletePrivateCloudRequest": { + "description": "Request message for VmwareEngine.UndeletePrivateCloud", + "id": "UndeletePrivateCloudRequest", + "properties": { + "requestId": { + "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + } + }, + "type": "object" + }, + "Vcenter": { + "description": "Details about a vCenter Server management appliance.", + "id": "Vcenter", + "properties": { + "fqdn": { + "description": "Fully qualified domain name of the appliance.", + "type": "string" + }, + "internalIp": { + "description": "Internal IP address of the appliance.", + "type": "string" + }, + "state": { + "description": "Output only. The state of the appliance.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "CREATING" + ], + "enumDescriptions": [ + "Unspecified appliance state. This is the default value.", + "The appliance is operational and can be used.", + "The appliance is being deployed." + ], + "readOnly": true, + "type": "string" + }, + "version": { + "description": "Version of the appliance.", + "type": "string" + } + }, + "type": "object" + }, + "VmwareEngineNetwork": { + "description": "VMware Engine network resource that provides connectivity for VMware Engine private clouds.", + "id": "VmwareEngineNetwork", + "properties": { + "createTime": { + "description": "Output only. Creation time of this resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "User-provided description for this VMware Engine network.", + "type": "string" + }, + "etag": { + "description": "Checksum that may be sent on update and delete requests to ensure that the user-provided value is up to date before the server processes a request. The server computes checksums based on the value of other fields in the request.", + "type": "string" + }, + "name": { + "description": "Output only. The resource name of the VMware Engine network. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/vmwareEngineNetworks/my-network`", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. State of the VMware Engine network.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "UPDATING", + "DELETING" + ], + "enumDescriptions": [ + "The default value. This value is used if the state is omitted.", + "The VMware Engine network is being created.", + "The VMware Engine network is ready.", + "The VMware Engine network is being updated.", + "The VMware Engine network is being deleted." + ], + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Required. VMware Engine network type.", + "enum": [ + "TYPE_UNSPECIFIED", + "LEGACY" + ], + "enumDescriptions": [ + "The default value. This value should never be used.", + "Network type used by private clouds created in projects without a network of type `STANDARD`. This network type is no longer used for new VMware Engine private cloud deployments." + ], + "type": "string" + }, + "uid": { + "description": "Output only. System-generated unique identifier for the resource.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Last update time of this resource.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "vpcNetworks": { + "description": "Output only. VMware Engine service VPC networks that provide connectivity from a private cloud to customer projects, the internet, and other Google Cloud services.", + "items": { + "$ref": "VpcNetwork" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "VpcNetwork": { + "description": "Represents a VMware Engine VPC network that is managed by a VMware Engine network resource.", + "id": "VpcNetwork", + "properties": { + "network": { + "description": "Output only. The relative resource name of the service VPC network this VMware Engine network is attached to. For example: `projects/123123/global/networks/my-network`", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Output only. Type of VPC network (INTRANET, INTERNET, or GOOGLE_CLOUD)", + "enum": [ + "TYPE_UNSPECIFIED", + "INTRANET", + "INTERNET", + "GOOGLE_CLOUD" + ], + "enumDescriptions": [ + "The default value. This value should never be used.", + "VPC network that will be peered with a consumer VPC network or the intranet VPC of another VMware Engine network. Access a private cloud through Compute Engine VMs on a peered VPC network or an on-premises resource connected to a peered consumer VPC network.", + "VPC network used for internet access to and from a private cloud.", + "VPC network used for access to Google Cloud services like Cloud Storage." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "VMware Engine API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/vmwareengine/v1/vmwareengine-gen.go b/vmwareengine/v1/vmwareengine-gen.go new file mode 100644 index 00000000000..0aab204fa3b --- /dev/null +++ b/vmwareengine/v1/vmwareengine-gen.go @@ -0,0 +1,11977 @@ +// Copyright 2023 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package vmwareengine provides access to the VMware Engine API. +// +// For product documentation, see: https://cloud.google.com/solutions/vmware-as-a-service +// +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/vmwareengine/v1" +// ... +// ctx := context.Background() +// vmwareengineService, err := vmwareengine.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: +// +// vmwareengineService, err := vmwareengine.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// vmwareengineService, err := vmwareengine.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package vmwareengine // import "google.golang.org/api/vmwareengine/v1" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "vmwareengine:v1" +const apiName = "vmwareengine" +const apiVersion = "v1" +const basePath = "https://vmwareengine.googleapis.com/" +const mtlsBasePath = "https://vmwareengine.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the + // email address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.NetworkPolicies = NewProjectsLocationsNetworkPoliciesService(s) + rs.NodeTypes = NewProjectsLocationsNodeTypesService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + rs.PrivateClouds = NewProjectsLocationsPrivateCloudsService(s) + rs.PrivateConnections = NewProjectsLocationsPrivateConnectionsService(s) + rs.VmwareEngineNetworks = NewProjectsLocationsVmwareEngineNetworksService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + NetworkPolicies *ProjectsLocationsNetworkPoliciesService + + NodeTypes *ProjectsLocationsNodeTypesService + + Operations *ProjectsLocationsOperationsService + + PrivateClouds *ProjectsLocationsPrivateCloudsService + + PrivateConnections *ProjectsLocationsPrivateConnectionsService + + VmwareEngineNetworks *ProjectsLocationsVmwareEngineNetworksService +} + +func NewProjectsLocationsNetworkPoliciesService(s *Service) *ProjectsLocationsNetworkPoliciesService { + rs := &ProjectsLocationsNetworkPoliciesService{s: s} + return rs +} + +type ProjectsLocationsNetworkPoliciesService struct { + s *Service +} + +func NewProjectsLocationsNodeTypesService(s *Service) *ProjectsLocationsNodeTypesService { + rs := &ProjectsLocationsNodeTypesService{s: s} + return rs +} + +type ProjectsLocationsNodeTypesService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +func NewProjectsLocationsPrivateCloudsService(s *Service) *ProjectsLocationsPrivateCloudsService { + rs := &ProjectsLocationsPrivateCloudsService{s: s} + rs.Clusters = NewProjectsLocationsPrivateCloudsClustersService(s) + rs.HcxActivationKeys = NewProjectsLocationsPrivateCloudsHcxActivationKeysService(s) + rs.Subnets = NewProjectsLocationsPrivateCloudsSubnetsService(s) + return rs +} + +type ProjectsLocationsPrivateCloudsService struct { + s *Service + + Clusters *ProjectsLocationsPrivateCloudsClustersService + + HcxActivationKeys *ProjectsLocationsPrivateCloudsHcxActivationKeysService + + Subnets *ProjectsLocationsPrivateCloudsSubnetsService +} + +func NewProjectsLocationsPrivateCloudsClustersService(s *Service) *ProjectsLocationsPrivateCloudsClustersService { + rs := &ProjectsLocationsPrivateCloudsClustersService{s: s} + return rs +} + +type ProjectsLocationsPrivateCloudsClustersService struct { + s *Service +} + +func NewProjectsLocationsPrivateCloudsHcxActivationKeysService(s *Service) *ProjectsLocationsPrivateCloudsHcxActivationKeysService { + rs := &ProjectsLocationsPrivateCloudsHcxActivationKeysService{s: s} + return rs +} + +type ProjectsLocationsPrivateCloudsHcxActivationKeysService struct { + s *Service +} + +func NewProjectsLocationsPrivateCloudsSubnetsService(s *Service) *ProjectsLocationsPrivateCloudsSubnetsService { + rs := &ProjectsLocationsPrivateCloudsSubnetsService{s: s} + return rs +} + +type ProjectsLocationsPrivateCloudsSubnetsService struct { + s *Service +} + +func NewProjectsLocationsPrivateConnectionsService(s *Service) *ProjectsLocationsPrivateConnectionsService { + rs := &ProjectsLocationsPrivateConnectionsService{s: s} + rs.PeeringRoutes = NewProjectsLocationsPrivateConnectionsPeeringRoutesService(s) + return rs +} + +type ProjectsLocationsPrivateConnectionsService struct { + s *Service + + PeeringRoutes *ProjectsLocationsPrivateConnectionsPeeringRoutesService +} + +func NewProjectsLocationsPrivateConnectionsPeeringRoutesService(s *Service) *ProjectsLocationsPrivateConnectionsPeeringRoutesService { + rs := &ProjectsLocationsPrivateConnectionsPeeringRoutesService{s: s} + return rs +} + +type ProjectsLocationsPrivateConnectionsPeeringRoutesService struct { + s *Service +} + +func NewProjectsLocationsVmwareEngineNetworksService(s *Service) *ProjectsLocationsVmwareEngineNetworksService { + rs := &ProjectsLocationsVmwareEngineNetworksService{s: s} + return rs +} + +type ProjectsLocationsVmwareEngineNetworksService struct { + s *Service +} + +// AuditConfig: Specifies the audit configuration for a service. The +// configuration determines which permission types are logged, and what +// identities, if any, are exempted from logging. An AuditConfig must +// have one or more AuditLogConfigs. If there are AuditConfigs for both +// `allServices` and a specific service, the union of the two +// AuditConfigs is used for that service: the log_types specified in +// each AuditConfig are enabled, and the exempted_members in each +// AuditLogConfig are exempted. Example Policy with multiple +// AuditConfigs: { "audit_configs": [ { "service": "allServices", +// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": +// [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { +// "log_type": "ADMIN_READ" } ] }, { "service": +// "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": +// "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ +// "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy +// enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts +// `jose@example.com` from DATA_READ logging, and `aliya@example.com` +// from DATA_WRITE logging. +type AuditConfig struct { + // AuditLogConfigs: The configuration for logging of each type of + // permission. + AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` + + // Service: Specifies a service that will be enabled for audit logging. + // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + // `allServices` is a special value that covers all services. + Service string `json:"service,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") 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. "AuditLogConfigs") 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 *AuditConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuditConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AuditLogConfig: Provides the configuration for logging a type of +// permissions. Example: { "audit_log_configs": [ { "log_type": +// "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { +// "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and +// 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ +// logging. +type AuditLogConfig struct { + // ExemptedMembers: Specifies the identities that do not cause logging + // for this type of permission. Follows the same format of + // Binding.members. + ExemptedMembers []string `json:"exemptedMembers,omitempty"` + + // LogType: The log type that this config enables. + // + // Possible values: + // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. + // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy + // "DATA_WRITE" - Data writes. Example: CloudSQL Users create + // "DATA_READ" - Data reads. Example: CloudSQL Users list + LogType string `json:"logType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExemptedMembers") 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. "ExemptedMembers") 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 *AuditLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuditLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Binding: Associates `members`, or principals, with a `role`. +type Binding struct { + // Condition: The condition that is associated with this binding. If the + // condition evaluates to `true`, then this binding applies to the + // current request. If the condition evaluates to `false`, then this + // binding does not apply to the current request. However, a different + // role binding might grant the same role to one or more of the + // principals in this binding. To learn which resources support + // conditions in their IAM policies, see the IAM documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Condition *Expr `json:"condition,omitempty"` + + // Members: Specifies the principals requesting access for a Google + // Cloud resource. `members` can have the following values: * + // `allUsers`: A special identifier that represents anyone who is on the + // internet; with or without a Google account. * + // `allAuthenticatedUsers`: A special identifier that represents anyone + // who is authenticated with a Google account or a service account. Does + // not include identities that come from external identity providers + // (IdPs) through identity federation. * `user:{emailid}`: An email + // address that represents a specific Google account. For example, + // `alice@example.com` . * `serviceAccount:{emailid}`: An email address + // that represents a Google service account. For example, + // `my-other-app@appspot.gserviceaccount.com`. * + // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: + // An identifier for a Kubernetes service account + // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). + // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. + // * `group:{emailid}`: An email address that represents a Google group. + // For example, `admins@example.com`. * `domain:{domain}`: The G Suite + // domain (primary) that represents all the users of that domain. For + // example, `google.com` or `example.com`. * + // `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus + // unique identifier) representing a user that has been recently + // deleted. For example, `alice@example.com?uid=123456789012345678901`. + // If the user is recovered, this value reverts to `user:{emailid}` and + // the recovered user retains the role in the binding. * + // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address + // (plus unique identifier) representing a service account that has been + // recently deleted. For example, + // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + // If the service account is undeleted, this value reverts to + // `serviceAccount:{emailid}` and the undeleted service account retains + // the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: + // An email address (plus unique identifier) representing a Google group + // that has been recently deleted. For example, + // `admins@example.com?uid=123456789012345678901`. If the group is + // recovered, this value reverts to `group:{emailid}` and the recovered + // group retains the role in the binding. + Members []string `json:"members,omitempty"` + + // Role: Role that is assigned to the list of `members`, or principals. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + Role string `json:"role,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with + // empty or 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. "Condition") 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 *Binding) MarshalJSON() ([]byte, error) { + type NoMethod Binding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Cluster: A cluster in a private cloud. +type Cluster struct { + // CreateTime: Output only. Creation time of this resource. + CreateTime string `json:"createTime,omitempty"` + + // Management: Output only. True if the cluster is a management cluster; + // false otherwise. There can only be one management cluster in a + // private cloud and it has to be the first one. + Management bool `json:"management,omitempty"` + + // Name: Output only. The resource name of this cluster. Resource names + // are schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. For example: + // `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/cl + // usters/my-cluster` + Name string `json:"name,omitempty"` + + // NodeTypeConfigs: Required. The map of cluster node types in this + // cluster, where the key is canonical identifier of the node type + // (corresponds to the `NodeType`). + NodeTypeConfigs map[string]NodeTypeConfig `json:"nodeTypeConfigs,omitempty"` + + // State: Output only. State of the resource. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value should never be + // used. + // "ACTIVE" - The Cluster is operational and can be used by the user. + // "CREATING" - The Cluster is being deployed. + // "UPDATING" - Adding or removing of a node to the cluster, any other + // cluster specific updates. + // "DELETING" - The Cluster is being deleted. + // "REPAIRING" - The Cluster is undergoing maintenance, for example: a + // failed node is getting replaced. + State string `json:"state,omitempty"` + + // Uid: Output only. System-generated unique identifier for the + // resource. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Last update time of this resource. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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 *Cluster) MarshalJSON() ([]byte, error) { + type NoMethod Cluster + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Credentials: Credentials for a private cloud. +type Credentials struct { + // Password: Initial password. + Password string `json:"password,omitempty"` + + // Username: Initial username. + Username string `json:"username,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Password") 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. "Password") 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 *Credentials) MarshalJSON() ([]byte, error) { + type NoMethod Credentials + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For +// instance: service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// Expr: Represents a textual expression in the Common Expression +// Language (CEL) syntax. CEL is a C-like expression language. The +// syntax and semantics of CEL are documented at +// https://github.com/google/cel-spec. Example (Comparison): title: +// "Summary size limit" description: "Determines if a summary is less +// than 100 chars" expression: "document.summary.size() < 100" Example +// (Equality): title: "Requestor is owner" description: "Determines if +// requestor is the document owner" expression: "document.owner == +// request.auth.claims.email" Example (Logic): title: "Public documents" +// description: "Determine whether the document should be publicly +// visible" expression: "document.type != 'private' && document.type != +// 'internal'" Example (Data Manipulation): title: "Notification string" +// description: "Create a notification string with a timestamp." +// expression: "'New message received at ' + +// string(document.create_time)" The exact variables and functions that +// may be referenced within an expression are determined by the service +// that evaluates it. See the service documentation for additional +// information. +type Expr struct { + // Description: Optional. Description of the expression. This is a + // longer text which describes the expression, e.g. when hovered over it + // in a UI. + Description string `json:"description,omitempty"` + + // Expression: Textual representation of an expression in Common + // Expression Language syntax. + Expression string `json:"expression,omitempty"` + + // Location: Optional. String indicating the location of the expression + // for error reporting, e.g. a file name and a position in the file. + Location string `json:"location,omitempty"` + + // Title: Optional. Title for the expression, i.e. a short string + // describing its purpose. This can be used e.g. in UIs which allow to + // enter the expression. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") 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. "Description") 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 *Expr) MarshalJSON() ([]byte, error) { + type NoMethod Expr + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Hcx: Details about a HCX Cloud Manager appliance. +type Hcx struct { + // Fqdn: Fully qualified domain name of the appliance. + Fqdn string `json:"fqdn,omitempty"` + + // InternalIp: Internal IP address of the appliance. + InternalIp string `json:"internalIp,omitempty"` + + // State: Output only. The state of the appliance. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified appliance state. This is the + // default value. + // "ACTIVE" - The appliance is operational and can be used. + // "CREATING" - The appliance is being deployed. + State string `json:"state,omitempty"` + + // Version: Version of the appliance. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Fqdn") 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. "Fqdn") 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 *Hcx) MarshalJSON() ([]byte, error) { + type NoMethod Hcx + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HcxActivationKey: HCX activation key. A default key is created during +// private cloud provisioning, but this behavior is subject to change +// and you should always verify active keys. Use +// VmwareEngine.ListHcxActivationKeys to retrieve existing keys and +// VmwareEngine.CreateHcxActivationKey to create new ones. +type HcxActivationKey struct { + // ActivationKey: Output only. HCX activation key. + ActivationKey string `json:"activationKey,omitempty"` + + // CreateTime: Output only. Creation time of HCX activation key. + CreateTime string `json:"createTime,omitempty"` + + // Name: Output only. The resource name of this HcxActivationKey. + // Resource names are schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. For example: + // `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxA + // ctivationKeys/my-key` + Name string `json:"name,omitempty"` + + // State: Output only. State of HCX activation key. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "AVAILABLE" - State of a newly generated activation key. + // "CONSUMED" - State of key when it has been used to activate HCX + // appliance. + // "CREATING" - State of key when it is being created. + State string `json:"state,omitempty"` + + // Uid: Output only. System-generated unique identifier for the + // resource. + Uid string `json:"uid,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ActivationKey") 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. "ActivationKey") 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 *HcxActivationKey) MarshalJSON() ([]byte, error) { + type NoMethod HcxActivationKey + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListClustersResponse: Response message for VmwareEngine.ListClusters +type ListClustersResponse struct { + // Clusters: A list of private cloud clusters. + Clusters []*Cluster `json:"clusters,omitempty"` + + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached when making an + // aggregated query using wildcards. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Clusters") 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. "Clusters") 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 *ListClustersResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListClustersResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListHcxActivationKeysResponse: Response message for +// VmwareEngine.ListHcxActivationKeys +type ListHcxActivationKeysResponse struct { + // HcxActivationKeys: List of HCX activation keys. + HcxActivationKeys []*HcxActivationKey `json:"hcxActivationKeys,omitempty"` + + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached when making an + // aggregated query using wildcards. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "HcxActivationKeys") + // 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. "HcxActivationKeys") 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 *ListHcxActivationKeysResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListHcxActivationKeysResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListLocationsResponse: The response message for +// Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*Location `json:"locations,omitempty"` + + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Locations") 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. "Locations") 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 *ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListNetworkPoliciesResponse: Response message for +// VmwareEngine.ListNetworkPolicies +type ListNetworkPoliciesResponse struct { + // NetworkPolicies: A list of network policies. + NetworkPolicies []*NetworkPolicy `json:"networkPolicies,omitempty"` + + // NextPageToken: A token, which can be send as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached when making an + // aggregated query using wildcards. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NetworkPolicies") 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. "NetworkPolicies") 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 *ListNetworkPoliciesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListNetworkPoliciesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListNodeTypesResponse: Response message for +// VmwareEngine.ListNodeTypes +type ListNodeTypesResponse struct { + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // NodeTypes: A list of Node Types. + NodeTypes []*NodeType `json:"nodeTypes,omitempty"` + + // Unreachable: Locations that could not be reached when making an + // aggregated query using wildcards. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. 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. "NextPageToken") 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 *ListNodeTypesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListNodeTypesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. 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. "NextPageToken") 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 *ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListPrivateCloudsResponse: Response message for +// VmwareEngine.ListPrivateClouds +type ListPrivateCloudsResponse struct { + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // PrivateClouds: A list of private clouds. + PrivateClouds []*PrivateCloud `json:"privateClouds,omitempty"` + + // Unreachable: Locations that could not be reached when making an + // aggregated query using wildcards. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. 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. "NextPageToken") 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 *ListPrivateCloudsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListPrivateCloudsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListPrivateConnectionPeeringRoutesResponse: Response message for +// VmwareEngine.ListPrivateConnectionPeeringRoutes +type ListPrivateConnectionPeeringRoutesResponse struct { + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // PeeringRoutes: A list of peering routes. + PeeringRoutes []*PeeringRoute `json:"peeringRoutes,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. 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. "NextPageToken") 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 *ListPrivateConnectionPeeringRoutesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListPrivateConnectionPeeringRoutesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListPrivateConnectionsResponse: Response message for +// VmwareEngine.ListPrivateConnections +type ListPrivateConnectionsResponse struct { + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // PrivateConnections: A list of private connections. + PrivateConnections []*PrivateConnection `json:"privateConnections,omitempty"` + + // Unreachable: Unreachable resources. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. 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. "NextPageToken") 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 *ListPrivateConnectionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListPrivateConnectionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListSubnetsResponse: Response message for VmwareEngine.ListSubnets +type ListSubnetsResponse struct { + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Subnets: A list of subnets. + Subnets []*Subnet `json:"subnets,omitempty"` + + // Unreachable: Locations that could not be reached when making an + // aggregated query using wildcards. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. 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. "NextPageToken") 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 *ListSubnetsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListSubnetsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListVmwareEngineNetworksResponse: Response message for +// VmwareEngine.ListVmwareEngineNetworks +type ListVmwareEngineNetworksResponse struct { + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Unreachable resources. + Unreachable []string `json:"unreachable,omitempty"` + + // VmwareEngineNetworks: A list of VMware Engine networks. + VmwareEngineNetworks []*VmwareEngineNetwork `json:"vmwareEngineNetworks,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. 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. "NextPageToken") 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 *ListVmwareEngineNetworksResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListVmwareEngineNetworksResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Location: A resource that represents a Google Cloud location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + + // LocationId: The canonical id for this location. For example: + // "us-east1". + LocationId string `json:"locationId,omitempty"` + + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") 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. "DisplayName") 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 *Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ManagementCluster: Management cluster configuration. +type ManagementCluster struct { + // ClusterId: Required. The user-provided identifier of the new + // `Cluster`. The identifier must meet the following requirements: * + // Only contains 1-63 alphanumeric characters and hyphens * Begins with + // an alphabetical character * Ends with a non-hyphen character * Not + // formatted as a UUID * Complies with RFC 1034 + // (https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) + ClusterId string `json:"clusterId,omitempty"` + + // NodeTypeConfigs: Required. The map of cluster node types in this + // cluster, where the key is canonical identifier of the node type + // (corresponds to the `NodeType`). + NodeTypeConfigs map[string]NodeTypeConfig `json:"nodeTypeConfigs,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClusterId") 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. "ClusterId") 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 *ManagementCluster) MarshalJSON() ([]byte, error) { + type NoMethod ManagementCluster + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkConfig: Network configuration in the consumer project with +// which the peering has to be done. +type NetworkConfig struct { + // ManagementCidr: Required. Management CIDR used by VMware management + // appliances. + ManagementCidr string `json:"managementCidr,omitempty"` + + // ManagementIpAddressLayoutVersion: Output only. The IP address layout + // version of the management IP address range. Possible versions + // include: * `managementIpAddressLayoutVersion=1`: Indicates the legacy + // IP address layout used by some existing private clouds. This is no + // longer supported for new private clouds as it does not support all + // features. * `managementIpAddressLayoutVersion=2`: Indicates the + // latest IP address layout used by all newly created private clouds. + // This version supports all current features. + ManagementIpAddressLayoutVersion int64 `json:"managementIpAddressLayoutVersion,omitempty"` + + // VmwareEngineNetwork: Optional. The relative resource name of the + // VMware Engine network attached to the private cloud. Specify the name + // in the following form: + // `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_ + // engine_network_id}` where `{project}` can either be a project number + // or a project ID. + VmwareEngineNetwork string `json:"vmwareEngineNetwork,omitempty"` + + // VmwareEngineNetworkCanonical: Output only. The canonical name of the + // VMware Engine network in the form: + // `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{ + // vmware_engine_network_id}` + VmwareEngineNetworkCanonical string `json:"vmwareEngineNetworkCanonical,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ManagementCidr") 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. "ManagementCidr") 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 *NetworkConfig) MarshalJSON() ([]byte, error) { + type NoMethod NetworkConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkPolicy: Represents a network policy resource. Network policies +// are regional resources. You can use a network policy to enable or +// disable internet access and external IP access. Network policies are +// associated with a VMware Engine network, which might span across +// regions. For a given region, a network policy applies to all private +// clouds in the VMware Engine network associated with the policy. +type NetworkPolicy struct { + // CreateTime: Output only. Creation time of this resource. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. User-provided description for this network + // policy. + Description string `json:"description,omitempty"` + + // EdgeServicesCidr: Required. IP address range in CIDR notation used to + // create internet access and external IP access. An RFC 1918 CIDR + // block, with a "/26" prefix, is required. The range cannot overlap + // with any prefixes either in the consumer VPC network or in use by the + // private clouds attached to that VPC network. + EdgeServicesCidr string `json:"edgeServicesCidr,omitempty"` + + // ExternalIp: Network service that allows External IP addresses to be + // assigned to VMware workloads. This service can only be enabled when + // `internet_access` is also enabled. + ExternalIp *NetworkService `json:"externalIp,omitempty"` + + // InternetAccess: Network service that allows VMware workloads to + // access the internet. + InternetAccess *NetworkService `json:"internetAccess,omitempty"` + + // Name: Output only. The resource name of this network policy. Resource + // names are schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. For example: + // `projects/my-project/locations/us-central1/networkPolicies/my-network- + // policy` + Name string `json:"name,omitempty"` + + // Uid: Output only. System-generated unique identifier for the + // resource. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Last update time of this resource. + UpdateTime string `json:"updateTime,omitempty"` + + // VmwareEngineNetwork: Optional. The relative resource name of the + // VMware Engine network. Specify the name in the following form: + // `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_ + // engine_network_id}` where `{project}` can either be a project number + // or a project ID. + VmwareEngineNetwork string `json:"vmwareEngineNetwork,omitempty"` + + // VmwareEngineNetworkCanonical: Output only. The canonical name of the + // VMware Engine network in the form: + // `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{ + // vmware_engine_network_id}` + VmwareEngineNetworkCanonical string `json:"vmwareEngineNetworkCanonical,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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 *NetworkPolicy) MarshalJSON() ([]byte, error) { + type NoMethod NetworkPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkService: Represents a network service that is managed by a +// `NetworkPolicy` resource. A network service provides a way to control +// an aspect of external access to VMware workloads. For example, +// whether the VMware workloads in the private clouds governed by a +// network policy can access or be accessed from the internet. +type NetworkService struct { + // Enabled: True if the service is enabled; false otherwise. + Enabled bool `json:"enabled,omitempty"` + + // State: Output only. State of the service. New values may be added to + // this enum when appropriate. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified service state. This is the + // default value. + // "UNPROVISIONED" - Service is not provisioned. + // "RECONCILING" - Service is in the process of being + // provisioned/deprovisioned. + // "ACTIVE" - Service is active. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") 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. "Enabled") 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 *NetworkService) MarshalJSON() ([]byte, error) { + type NoMethod NetworkService + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NodeType: Describes node type. +type NodeType struct { + // AvailableCustomCoreCounts: Output only. List of possible values of + // custom core count. + AvailableCustomCoreCounts []int64 `json:"availableCustomCoreCounts,omitempty"` + + // DiskSizeGb: Output only. The amount of storage available, defined in + // GB. + DiskSizeGb int64 `json:"diskSizeGb,omitempty"` + + // DisplayName: Output only. The friendly name for this node type. For + // example: ve1-standard-72 + DisplayName string `json:"displayName,omitempty"` + + // MemoryGb: Output only. The amount of physical memory available, + // defined in GB. + MemoryGb int64 `json:"memoryGb,omitempty"` + + // Name: Output only. The resource name of this node type. Resource + // names are schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. For example: + // `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` + Name string `json:"name,omitempty"` + + // NodeTypeId: Output only. The canonical identifier of the node type + // (corresponds to the `NodeType`). For example: standard-72. + NodeTypeId string `json:"nodeTypeId,omitempty"` + + // TotalCoreCount: Output only. The total number of CPU cores in a + // single node. + TotalCoreCount int64 `json:"totalCoreCount,omitempty"` + + // VirtualCpuCount: Output only. The total number of virtual CPUs in a + // single node. + VirtualCpuCount int64 `json:"virtualCpuCount,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AvailableCustomCoreCounts") 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. + // "AvailableCustomCoreCounts") 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 *NodeType) MarshalJSON() ([]byte, error) { + type NoMethod NodeType + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NodeTypeConfig: Information about the type and number of nodes +// associated with the cluster. +type NodeTypeConfig struct { + // CustomCoreCount: Optional. Customized number of cores available to + // each node of the type. This number must always be one of + // `nodeType.availableCustomCoreCounts`. If zero is provided max value + // from `nodeType.availableCustomCoreCounts` will be used. + CustomCoreCount int64 `json:"customCoreCount,omitempty"` + + // NodeCount: Required. The number of nodes of this type in the cluster + NodeCount int64 `json:"nodeCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomCoreCount") 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. "CustomCoreCount") 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 *NodeTypeConfig) MarshalJSON() ([]byte, error) { + type NoMethod NodeTypeConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Nsx: Details about a NSX Manager appliance. +type Nsx struct { + // Fqdn: Fully qualified domain name of the appliance. + Fqdn string `json:"fqdn,omitempty"` + + // InternalIp: Internal IP address of the appliance. + InternalIp string `json:"internalIp,omitempty"` + + // State: Output only. The state of the appliance. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified appliance state. This is the + // default value. + // "ACTIVE" - The appliance is operational and can be used. + // "CREATING" - The appliance is being deployed. + State string `json:"state,omitempty"` + + // Version: Version of the appliance. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Fqdn") 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. "Fqdn") 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 *Nsx) MarshalJSON() ([]byte, error) { + type NoMethod Nsx + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is +// the result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // 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 + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") 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. "Done") 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 *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OperationMetadata: Represents the metadata of the long-running +// operation. +type OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. True if the user has requested + // cancellation of the operation; false otherwise. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") 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. "ApiVersion") 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 *OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PeeringRoute: Exchanged network peering route. +type PeeringRoute struct { + // DestRange: Output only. Destination range of the peering route in + // CIDR notation. + DestRange string `json:"destRange,omitempty"` + + // Direction: Output only. Direction of the routes exchanged with the + // peer network, from the VMware Engine network perspective: * Routes of + // direction `INCOMING` are imported from the peer network. * Routes of + // direction `OUTGOING` are exported from the intranet VPC network of + // the VMware Engine network. + // + // Possible values: + // "DIRECTION_UNSPECIFIED" - Unspecified exchanged routes direction. + // This is default. + // "INCOMING" - Routes imported from the peer network. + // "OUTGOING" - Routes exported to the peer network. + Direction string `json:"direction,omitempty"` + + // Imported: Output only. True if the peering route has been imported + // from a peered VPC network; false otherwise. The import happens if the + // field `NetworkPeering.importCustomRoutes` is true for this network, + // `NetworkPeering.exportCustomRoutes` is true for the peer VPC network, + // and the import does not result in a route conflict. + Imported bool `json:"imported,omitempty"` + + // NextHopRegion: Output only. Region containing the next hop of the + // peering route. This field only applies to dynamic routes in the peer + // VPC network. + NextHopRegion string `json:"nextHopRegion,omitempty"` + + // Priority: Output only. The priority of the peering route. + Priority int64 `json:"priority,omitempty,string"` + + // Type: Output only. Type of the route in the peer VPC network. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified peering route type. This is the + // default value. + // "DYNAMIC_PEERING_ROUTE" - Dynamic routes in the peer network. + // "STATIC_PEERING_ROUTE" - Static routes in the peer network. + // "SUBNET_PEERING_ROUTE" - Created, updated, and removed + // automatically by Google Cloud when subnets are created, modified, or + // deleted in the peer network. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DestRange") 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. "DestRange") 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 *PeeringRoute) MarshalJSON() ([]byte, error) { + type NoMethod PeeringRoute + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Policy: An Identity and Access Management (IAM) policy, which +// specifies access controls for Google Cloud resources. A `Policy` is a +// collection of `bindings`. A `binding` binds one or more `members`, or +// principals, to a 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 < 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 < +// 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/). +type Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` + + // Bindings: Associates a list of `members`, or principals, with a + // `role`. Optionally, may specify a `condition` that determines how and + // when the `bindings` are applied. Each of the `bindings` must contain + // at least one principal. The `bindings` in a `Policy` can refer to up + // to 1,500 principals; up to 250 of these principals can be Google + // groups. Each occurrence of a principal counts towards these limits. + // For example, if the `bindings` grant 50 different roles to + // `user:alice@example.com`, and not to any other principal, then you + // can add another 1,450 principals to the `bindings` in the `Policy`. + Bindings []*Binding `json:"bindings,omitempty"` + + // Etag: `etag` is used for optimistic concurrency control as a way to + // help prevent simultaneous updates of a policy from overwriting each + // other. It is strongly suggested that systems make use of the `etag` + // in the read-modify-write cycle to perform policy updates in order to + // avoid race conditions: An `etag` is returned in the response to + // `getIamPolicy`, and systems are expected to put that etag in the + // request to `setIamPolicy` to ensure that their change will be applied + // to the same version of the policy. **Important:** If you use IAM + // Conditions, you must include the `etag` field whenever you call + // `setIamPolicy`. If you omit this field, then IAM allows you to + // overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. + Etag string `json:"etag,omitempty"` + + // Version: Specifies the format of the policy. Valid values are `0`, + // `1`, and `3`. Requests that specify an invalid value are rejected. + // Any operation that affects conditional role bindings must specify + // version `3`. This requirement applies to the following operations: * + // Getting a policy that includes a conditional role binding * Adding a + // conditional role binding to a policy * Changing a conditional role + // binding in a policy * Removing any role binding, with or without a + // condition, from a policy that includes conditions **Important:** If + // you use IAM Conditions, you must include the `etag` field whenever + // you call `setIamPolicy`. If you omit this field, then IAM allows you + // to overwrite a version `3` policy with a version `1` policy, and all + // of the conditions in the version `3` policy are lost. If a policy + // does not include any conditions, operations on that policy may + // specify any valid version or leave the field unset. To learn which + // resources support conditions in their IAM policies, see the IAM + // documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Version int64 `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AuditConfigs") 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. "AuditConfigs") 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 *Policy) MarshalJSON() ([]byte, error) { + type NoMethod Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PrivateCloud: Represents a private cloud resource. Private clouds of +// type `STANDARD` and `TIME_LIMITED` are zonal resources, `STRETCHED` +// private clouds are regional. +type PrivateCloud struct { + // CreateTime: Output only. Creation time of this resource. + CreateTime string `json:"createTime,omitempty"` + + // DeleteTime: Output only. Time when the resource was scheduled for + // deletion. + DeleteTime string `json:"deleteTime,omitempty"` + + // Description: User-provided description for this private cloud. + Description string `json:"description,omitempty"` + + // ExpireTime: Output only. Time when the resource will be irreversibly + // deleted. + ExpireTime string `json:"expireTime,omitempty"` + + // Hcx: Output only. HCX appliance. + Hcx *Hcx `json:"hcx,omitempty"` + + // ManagementCluster: Required. Input only. The management cluster for + // this private cloud. This field is required during creation of the + // private cloud to provide details for the default cluster. The + // following fields can't be changed after private cloud creation: + // `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`. + ManagementCluster *ManagementCluster `json:"managementCluster,omitempty"` + + // Name: Output only. The resource name of this private cloud. Resource + // names are schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. For example: + // `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + Name string `json:"name,omitempty"` + + // NetworkConfig: Required. Network configuration of the private cloud. + NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"` + + // Nsx: Output only. NSX appliance. + Nsx *Nsx `json:"nsx,omitempty"` + + // State: Output only. State of the resource. New values may be added to + // this enum when appropriate. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value should never be + // used. + // "ACTIVE" - The private cloud is ready. + // "CREATING" - The private cloud is being created. + // "UPDATING" - The private cloud is being updated. + // "FAILED" - The private cloud is in failed state. + // "DELETED" - The private cloud is scheduled for deletion. The + // deletion process can be cancelled by using the corresponding undelete + // method. + // "PURGING" - The private cloud is irreversibly deleted and is being + // removed from the system. + State string `json:"state,omitempty"` + + // Type: Optional. Type of the private cloud. Defaults to STANDARD. + // + // Possible values: + // "STANDARD" - Standard private is a zonal resource, with 3+ nodes. + // Default type. + // "TIME_LIMITED" - Time limited private cloud is a zonal resource, + // can have only 1 node and has limited life span. Will be deleted after + // defined period of time, can be converted into standard private cloud + // by expanding it up to 3 or more nodes. + Type string `json:"type,omitempty"` + + // Uid: Output only. System-generated unique identifier for the + // resource. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Last update time of this resource. + UpdateTime string `json:"updateTime,omitempty"` + + // Vcenter: Output only. Vcenter appliance. + Vcenter *Vcenter `json:"vcenter,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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 *PrivateCloud) MarshalJSON() ([]byte, error) { + type NoMethod PrivateCloud + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PrivateConnection: Private connection resource that provides +// connectivity for VMware Engine private clouds. +type PrivateConnection struct { + // CreateTime: Output only. Creation time of this resource. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. User-provided description for this private + // connection. + Description string `json:"description,omitempty"` + + // Name: Output only. The resource name of the private connection. + // Resource names are schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. For example: + // `projects/my-project/locations/us-central1/privateConnections/my-conne + // ction` + Name string `json:"name,omitempty"` + + // PeeringId: Output only. VPC network peering id between given network + // VPC and VMwareEngineNetwork. + PeeringId string `json:"peeringId,omitempty"` + + // PeeringState: Output only. Peering state between service network and + // VMware Engine network. + // + // Possible values: + // "PEERING_STATE_UNSPECIFIED" - The default value. This value is used + // if the peering state is omitted or unknown. + // "PEERING_ACTIVE" - The peering is in active state. + // "PEERING_INACTIVE" - The peering is in inactive state. + PeeringState string `json:"peeringState,omitempty"` + + // RoutingMode: Optional. Routing Mode. Default value is set to GLOBAL. + // For type = PRIVATE_SERVICE_ACCESS, this field can be set to GLOBAL or + // REGIONAL, for other types only GLOBAL is supported. + // + // Possible values: + // "ROUTING_MODE_UNSPECIFIED" - The default value. This value should + // never be used. + // "GLOBAL" - Global Routing Mode + // "REGIONAL" - Regional Routing Mode + RoutingMode string `json:"routingMode,omitempty"` + + // ServiceNetwork: Required. Service network to create private + // connection. Specify the name in the following form: + // `projects/{project}/global/networks/{network_id}` For type = + // PRIVATE_SERVICE_ACCESS, this field represents servicenetworking VPC, + // e.g. projects/project-tp/global/networks/servicenetworking. For type + // = NETAPP_CLOUD_VOLUME, this field represents NetApp service VPC, e.g. + // projects/project-tp/global/networks/netapp-tenant-vpc. For type = + // DELL_POWERSCALE, this field represent Dell service VPC, e.g. + // projects/project-tp/global/networks/dell-tenant-vpc. For type= + // THIRD_PARTY_SERVICE, this field could represent a consumer VPC or any + // other producer VPC to which the VMware Engine Network needs to be + // connected, e.g. projects/project/global/networks/vpc. + ServiceNetwork string `json:"serviceNetwork,omitempty"` + + // State: Output only. State of the private connection. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value is used if the + // state is omitted. + // "CREATING" - The private connection is being created. + // "ACTIVE" - The private connection is ready. + // "UPDATING" - The private connection is being updated. + // "DELETING" - The private connection is being deleted. + // "UNPROVISIONED" - The private connection is not provisioned, since + // no private cloud is present for which this private connection is + // needed. + // "FAILED" - The private connection is in failed state. + State string `json:"state,omitempty"` + + // Type: Required. Private connection type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The default value. This value should never be + // used. + // "PRIVATE_SERVICE_ACCESS" - Connection used for establishing + // [private services + // access](https://cloud.google.com/vpc/docs/private-services-access). + // "NETAPP_CLOUD_VOLUMES" - Connection used for connecting to NetApp + // Cloud Volumes. + // "DELL_POWERSCALE" - Connection used for connecting to Dell + // PowerScale. + // "THIRD_PARTY_SERVICE" - Connection used for connecting to + // third-party services. + Type string `json:"type,omitempty"` + + // Uid: Output only. System-generated unique identifier for the + // resource. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Last update time of this resource. + UpdateTime string `json:"updateTime,omitempty"` + + // VmwareEngineNetwork: Required. The relative resource name of Legacy + // VMware Engine network. Specify the name in the following form: + // `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_ + // engine_network_id}` where `{project}`, `{location}` will be same as + // specified in private connection resource name and + // `{vmware_engine_network_id}` will be in the form of + // `{location}`-default e.g. + // projects/project/locations/us-central1/vmwareEngineNetworks/us-central + // 1-default. + VmwareEngineNetwork string `json:"vmwareEngineNetwork,omitempty"` + + // VmwareEngineNetworkCanonical: Output only. The canonical name of the + // VMware Engine network in the form: + // `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{ + // vmware_engine_network_id}` + VmwareEngineNetworkCanonical string `json:"vmwareEngineNetworkCanonical,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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 *PrivateConnection) MarshalJSON() ([]byte, error) { + type NoMethod PrivateConnection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResetNsxCredentialsRequest: Request message for +// VmwareEngine.ResetNsxCredentials +type ResetNsxCredentialsRequest struct { + // RequestId: Optional. A request ID to identify requests. Specify a + // unique request ID so that if you must retry your request, the server + // will know to ignore the request if it has already been completed. The + // server guarantees that a request doesn't result in creation of + // duplicate commitments for at least 60 minutes. For example, consider + // a situation where you make an initial request and the request times + // out. If you make the request again with the same request ID, the + // server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. The request + // ID must be a valid UUID with the exception that zero UUID is not + // supported (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. 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. "RequestId") 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 *ResetNsxCredentialsRequest) MarshalJSON() ([]byte, error) { + type NoMethod ResetNsxCredentialsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResetVcenterCredentialsRequest: Request message for +// VmwareEngine.ResetVcenterCredentials +type ResetVcenterCredentialsRequest struct { + // RequestId: Optional. A request ID to identify requests. Specify a + // unique request ID so that if you must retry your request, the server + // will know to ignore the request if it has already been completed. The + // server guarantees that a request doesn't result in creation of + // duplicate commitments for at least 60 minutes. For example, consider + // a situation where you make an initial request and the request times + // out. If you make the request again with the same request ID, the + // server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. The request + // ID must be a valid UUID with the exception that zero UUID is not + // supported (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. 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. "RequestId") 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 *ResetVcenterCredentialsRequest) MarshalJSON() ([]byte, error) { + type NoMethod ResetVcenterCredentialsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SetIamPolicyRequest: Request message for `SetIamPolicy` method. +type SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the + // `resource`. The size of the policy is limited to a few 10s of KB. An + // empty policy is a valid policy but certain Google Cloud services + // (such as Projects) might reject them. + Policy *Policy `json:"policy,omitempty"` + + // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the + // policy to modify. Only the fields in the mask will be modified. If no + // mask is provided, the following default mask is used: `paths: + // "bindings, etag" + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") 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. "Policy") 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 *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod SetIamPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Subnet: Subnet in a private cloud. Either `management` subnets (such +// as vMotion) that are read-only, or `userDefined`, which can also be +// updated. +type Subnet struct { + // GatewayIp: The IP address of the gateway of this subnet. Must fall + // within the IP prefix defined above. + GatewayIp string `json:"gatewayIp,omitempty"` + + // IpCidrRange: The IP address range of the subnet in CIDR format + // '10.0.0.0/24'. + IpCidrRange string `json:"ipCidrRange,omitempty"` + + // Name: Output only. The resource name of this subnet. Resource names + // are schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. For example: + // `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/su + // bnets/my-subnet` + Name string `json:"name,omitempty"` + + // State: Output only. The state of the resource. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value should never be + // used. + // "ACTIVE" - The subnet is ready. + // "CREATING" - The subnet is being created. + // "UPDATING" - The subnet is being updated. + // "DELETING" - The subnet is being deleted. + // "RECONCILING" - Changes requested in the last operation are being + // propagated. + // "FAILED" - Last operation on the subnet did not succeed. Subnet's + // payload is reverted back to its most recent working state. + State string `json:"state,omitempty"` + + // Type: Output only. The type of the subnet. For example "management" + // or "userDefined". + Type string `json:"type,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "GatewayIp") 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. "GatewayIp") 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 *Subnet) MarshalJSON() ([]byte, error) { + type NoMethod Subnet + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsRequest: Request message for `TestIamPermissions` +// method. +type TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the `resource`. + // Permissions with wildcards (such as `*` or `storage.*`) are not + // allowed. For more information see IAM Overview + // (https://cloud.google.com/iam/docs/overview#permissions). + Permissions []string `json:"permissions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Permissions") 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. "Permissions") 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 *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsResponse: Response message for `TestIamPermissions` +// method. +type TestIamPermissionsResponse struct { + // Permissions: A subset of `TestPermissionsRequest.permissions` that + // the caller is allowed. + Permissions []string `json:"permissions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Permissions") 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. "Permissions") 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 *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UndeletePrivateCloudRequest: Request message for +// VmwareEngine.UndeletePrivateCloud +type UndeletePrivateCloudRequest struct { + // RequestId: Optional. The request ID must be a valid UUID with the + // exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. 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. "RequestId") 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 *UndeletePrivateCloudRequest) MarshalJSON() ([]byte, error) { + type NoMethod UndeletePrivateCloudRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Vcenter: Details about a vCenter Server management appliance. +type Vcenter struct { + // Fqdn: Fully qualified domain name of the appliance. + Fqdn string `json:"fqdn,omitempty"` + + // InternalIp: Internal IP address of the appliance. + InternalIp string `json:"internalIp,omitempty"` + + // State: Output only. The state of the appliance. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified appliance state. This is the + // default value. + // "ACTIVE" - The appliance is operational and can be used. + // "CREATING" - The appliance is being deployed. + State string `json:"state,omitempty"` + + // Version: Version of the appliance. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Fqdn") 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. "Fqdn") 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 *Vcenter) MarshalJSON() ([]byte, error) { + type NoMethod Vcenter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VmwareEngineNetwork: VMware Engine network resource that provides +// connectivity for VMware Engine private clouds. +type VmwareEngineNetwork struct { + // CreateTime: Output only. Creation time of this resource. + CreateTime string `json:"createTime,omitempty"` + + // Description: User-provided description for this VMware Engine + // network. + Description string `json:"description,omitempty"` + + // Etag: Checksum that may be sent on update and delete requests to + // ensure that the user-provided value is up to date before the server + // processes a request. The server computes checksums based on the value + // of other fields in the request. + Etag string `json:"etag,omitempty"` + + // Name: Output only. The resource name of the VMware Engine network. + // Resource names are schemeless URIs that follow the conventions in + // https://cloud.google.com/apis/design/resource_names. For example: + // `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + Name string `json:"name,omitempty"` + + // State: Output only. State of the VMware Engine network. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. This value is used if the + // state is omitted. + // "CREATING" - The VMware Engine network is being created. + // "ACTIVE" - The VMware Engine network is ready. + // "UPDATING" - The VMware Engine network is being updated. + // "DELETING" - The VMware Engine network is being deleted. + State string `json:"state,omitempty"` + + // Type: Required. VMware Engine network type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The default value. This value should never be + // used. + // "LEGACY" - Network type used by private clouds created in projects + // without a network of type `STANDARD`. This network type is no longer + // used for new VMware Engine private cloud deployments. + Type string `json:"type,omitempty"` + + // Uid: Output only. System-generated unique identifier for the + // resource. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Last update time of this resource. + UpdateTime string `json:"updateTime,omitempty"` + + // VpcNetworks: Output only. VMware Engine service VPC networks that + // provide connectivity from a private cloud to customer projects, the + // internet, and other Google Cloud services. + VpcNetworks []*VpcNetwork `json:"vpcNetworks,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") 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 *VmwareEngineNetwork) MarshalJSON() ([]byte, error) { + type NoMethod VmwareEngineNetwork + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VpcNetwork: Represents a VMware Engine VPC network that is managed by +// a VMware Engine network resource. +type VpcNetwork struct { + // Network: Output only. The relative resource name of the service VPC + // network this VMware Engine network is attached to. For example: + // `projects/123123/global/networks/my-network` + Network string `json:"network,omitempty"` + + // Type: Output only. Type of VPC network (INTRANET, INTERNET, or + // GOOGLE_CLOUD) + // + // Possible values: + // "TYPE_UNSPECIFIED" - The default value. This value should never be + // used. + // "INTRANET" - VPC network that will be peered with a consumer VPC + // network or the intranet VPC of another VMware Engine network. Access + // a private cloud through Compute Engine VMs on a peered VPC network or + // an on-premises resource connected to a peered consumer VPC network. + // "INTERNET" - VPC network used for internet access to and from a + // private cloud. + // "GOOGLE_CLOUD" - VPC network used for access to Google Cloud + // services like Cloud Storage. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Network") 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. "Network") 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 *VpcNetwork) MarshalJSON() ([]byte, error) { + type NoMethod VpcNetwork + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "vmwareengine.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + 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 *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) 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/{+name}") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.get" call. +// Exactly one of *Location or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Location.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 *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, 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 := &Location{ + 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 information about a location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name for the location.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Location" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in +// AIP-160 (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + 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 *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) 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/{+name}/locations") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.list" call. +// Exactly one of *ListLocationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.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 *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, 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 := &ListLocationsResponse{ + 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": "Lists information about the supported locations for this service.", + // "flatPath": "v1/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/locations", + // "response": { + // "$ref": "ListLocationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "vmwareengine.projects.locations.networkPolicies.create": + +type ProjectsLocationsNetworkPoliciesCreateCall struct { + s *Service + parent string + networkpolicy *NetworkPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new network policy in a given VMware Engine network +// of a project and location (region). A new network policy cannot be +// created if another network policy already exists in the same scope. +// +// - parent: The resource name of the location (region) to create the +// new network policy in. Resource names are schemeless URIs that +// follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1`. +func (r *ProjectsLocationsNetworkPoliciesService) Create(parent string, networkpolicy *NetworkPolicy) *ProjectsLocationsNetworkPoliciesCreateCall { + c := &ProjectsLocationsNetworkPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.networkpolicy = networkpolicy + return c +} + +// NetworkPolicyId sets the optional parameter "networkPolicyId": +// Required. The user-provided identifier of the network policy to be +// created. This identifier must be unique within parent +// `projects/{my-project}/locations/{us-central1}/networkPolicies` and +// becomes the final token in the name URI. The identifier must meet the +// following requirements: * Only contains 1-63 alphanumeric characters +// and hyphens * Begins with an alphabetical character * Ends with a +// non-hyphen character * Not formatted as a UUID * Complies with RFC +// 1034 (https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) +func (c *ProjectsLocationsNetworkPoliciesCreateCall) NetworkPolicyId(networkPolicyId string) *ProjectsLocationsNetworkPoliciesCreateCall { + c.urlParams_.Set("networkPolicyId", networkPolicyId) + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsNetworkPoliciesCreateCall) RequestId(requestId string) *ProjectsLocationsNetworkPoliciesCreateCall { + c.urlParams_.Set("requestId", requestId) + 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 *ProjectsLocationsNetworkPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworkPoliciesCreateCall { + 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 *ProjectsLocationsNetworkPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsNetworkPoliciesCreateCall { + 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 *ProjectsLocationsNetworkPoliciesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNetworkPoliciesCreateCall) 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.networkpolicy) + 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/{+parent}/networkPolicies") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.networkPolicies.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNetworkPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new network policy in a given VMware Engine network of a project and location (region). A new network policy cannot be created if another network policy already exists in the same scope.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.networkPolicies.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "networkPolicyId": { + // "description": "Required. The user-provided identifier of the network policy to be created. This identifier must be unique within parent `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the location (region) to create the new network policy in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/networkPolicies", + // "request": { + // "$ref": "NetworkPolicy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.networkPolicies.delete": + +type ProjectsLocationsNetworkPoliciesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a `NetworkPolicy` resource. A network policy cannot +// be deleted when `NetworkService.state` is set to `RECONCILING` for +// either its external IP or internet access service. +// +// - name: The resource name of the network policy to delete. Resource +// names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1/networkPolicies/my-networ +// k-policy`. +func (r *ProjectsLocationsNetworkPoliciesService) Delete(name string) *ProjectsLocationsNetworkPoliciesDeleteCall { + c := &ProjectsLocationsNetworkPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsNetworkPoliciesDeleteCall) RequestId(requestId string) *ProjectsLocationsNetworkPoliciesDeleteCall { + c.urlParams_.Set("requestId", requestId) + 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 *ProjectsLocationsNetworkPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworkPoliciesDeleteCall { + 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 *ProjectsLocationsNetworkPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsNetworkPoliciesDeleteCall { + 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 *ProjectsLocationsNetworkPoliciesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNetworkPoliciesDeleteCall) 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 + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.networkPolicies.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNetworkPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a `NetworkPolicy` resource. A network policy cannot be deleted when `NetworkService.state` is set to `RECONCILING` for either its external IP or internet access service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}", + // "httpMethod": "DELETE", + // "id": "vmwareengine.projects.locations.networkPolicies.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the network policy to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.networkPolicies.get": + +type ProjectsLocationsNetworkPoliciesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a `NetworkPolicy` resource by its resource name. +// +// - name: The resource name of the network policy to retrieve. Resource +// names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1/networkPolicies/my-networ +// k-policy`. +func (r *ProjectsLocationsNetworkPoliciesService) Get(name string) *ProjectsLocationsNetworkPoliciesGetCall { + c := &ProjectsLocationsNetworkPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + 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 *ProjectsLocationsNetworkPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworkPoliciesGetCall { + 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 *ProjectsLocationsNetworkPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetworkPoliciesGetCall { + 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 *ProjectsLocationsNetworkPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsNetworkPoliciesGetCall { + 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 *ProjectsLocationsNetworkPoliciesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNetworkPoliciesGetCall) 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/{+name}") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.networkPolicies.get" call. +// Exactly one of *NetworkPolicy or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *NetworkPolicy.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 *ProjectsLocationsNetworkPoliciesGetCall) Do(opts ...googleapi.CallOption) (*NetworkPolicy, 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 := &NetworkPolicy{ + 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": "Retrieves a `NetworkPolicy` resource by its resource name.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.networkPolicies.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the network policy to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "NetworkPolicy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.networkPolicies.list": + +type ProjectsLocationsNetworkPoliciesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists `NetworkPolicy` resources in a specified project and +// location. +// +// - parent: The resource name of the location (region) to query for +// network policies. Resource names are schemeless URIs that follow +// the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1`. +func (r *ProjectsLocationsNetworkPoliciesService) List(parent string) *ProjectsLocationsNetworkPoliciesListCall { + c := &ProjectsLocationsNetworkPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// matches resources returned in the response. The expression must +// specify the field name, a comparison operator, and the value that you +// want to use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For +// example, if you are filtering a list of network policies, you can +// exclude the ones named `example-policy` by specifying `name != +// "example-policy". To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` (name = +// "example-policy") (createTime > "2021-04-12T08:15:10.40Z") ``` By +// default, each expression is an `AND` expression. However, you can +// include `AND` and `OR` expressions explicitly. For example: ``` (name +// = "example-policy-1") AND (createTime > "2021-04-12T08:15:10.40Z") OR +// (name = "example-policy-2") ``` +func (c *ProjectsLocationsNetworkPoliciesListCall) Filter(filter string) *ProjectsLocationsNetworkPoliciesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, returned results are ordered by `name` +// in ascending order. You can also sort results in descending order +// based on the `name` value using `orderBy="name desc". Currently, +// only ordering by `name` is supported. +func (c *ProjectsLocationsNetworkPoliciesListCall) OrderBy(orderBy string) *ProjectsLocationsNetworkPoliciesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of network policies to return in one page. The service may return +// fewer than this value. The maximum value is coerced to 1000. The +// default value of this field is 500. +func (c *ProjectsLocationsNetworkPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsNetworkPoliciesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListNetworkPolicies` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListNetworkPolicies` must match the call that provided +// the page token. +func (c *ProjectsLocationsNetworkPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsNetworkPoliciesListCall { + c.urlParams_.Set("pageToken", pageToken) + 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 *ProjectsLocationsNetworkPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworkPoliciesListCall { + 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 *ProjectsLocationsNetworkPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetworkPoliciesListCall { + 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 *ProjectsLocationsNetworkPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsNetworkPoliciesListCall { + 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 *ProjectsLocationsNetworkPoliciesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNetworkPoliciesListCall) 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/{+parent}/networkPolicies") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.networkPolicies.list" call. +// Exactly one of *ListNetworkPoliciesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListNetworkPoliciesResponse.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 *ProjectsLocationsNetworkPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListNetworkPoliciesResponse, 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 := &ListNetworkPoliciesResponse{ + 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": "Lists `NetworkPolicy` resources in a specified project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.networkPolicies.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of network policies, you can exclude the ones named `example-policy` by specifying `name != \"example-policy\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-policy\") (createTime \u003e \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-policy-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-policy-2\") ```", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of network policies to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListNetworkPolicies` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListNetworkPolicies` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the location (region) to query for network policies. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/networkPolicies", + // "response": { + // "$ref": "ListNetworkPoliciesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsNetworkPoliciesListCall) Pages(ctx context.Context, f func(*ListNetworkPoliciesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "vmwareengine.projects.locations.networkPolicies.patch": + +type ProjectsLocationsNetworkPoliciesPatchCall struct { + s *Service + name string + networkpolicy *NetworkPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Modifies a `NetworkPolicy` resource. Only the following fields +// can be updated: `internet_access`, `external_ip`, +// `edge_services_cidr`. Only fields specified in `updateMask` are +// applied. When updating a network policy, the external IP network +// service can only be disabled if there are no external IP addresses +// present in the scope of the policy. Also, a `NetworkService` cannot +// be updated when `NetworkService.state` is set to `RECONCILING`. +// During operation processing, the resource is temporarily in the +// `ACTIVE` state before the operation fully completes. For that period +// of time, you can't update the resource. Use the operation status to +// determine when the processing fully completes. +// +// - name: Output only. The resource name of this network policy. +// Resource names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1/networkPolicies/my-networ +// k-policy`. +func (r *ProjectsLocationsNetworkPoliciesService) Patch(name string, networkpolicy *NetworkPolicy) *ProjectsLocationsNetworkPoliciesPatchCall { + c := &ProjectsLocationsNetworkPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.networkpolicy = networkpolicy + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsNetworkPoliciesPatchCall) RequestId(requestId string) *ProjectsLocationsNetworkPoliciesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the +// `NetworkPolicy` resource by the update. The fields specified in the +// `update_mask` are relative to the resource, not the full request. A +// field will be overwritten if it is in the mask. If the user does not +// provide a mask then all fields will be overwritten. +func (c *ProjectsLocationsNetworkPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsNetworkPoliciesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + 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 *ProjectsLocationsNetworkPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworkPoliciesPatchCall { + 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 *ProjectsLocationsNetworkPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsNetworkPoliciesPatchCall { + 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 *ProjectsLocationsNetworkPoliciesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNetworkPoliciesPatchCall) 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.networkpolicy) + 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/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.networkPolicies.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNetworkPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Modifies a `NetworkPolicy` resource. Only the following fields can be updated: `internet_access`, `external_ip`, `edge_services_cidr`. Only fields specified in `updateMask` are applied. When updating a network policy, the external IP network service can only be disabled if there are no external IP addresses present in the scope of the policy. Also, a `NetworkService` cannot be updated when `NetworkService.state` is set to `RECONCILING`. During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}", + // "httpMethod": "PATCH", + // "id": "vmwareengine.projects.locations.networkPolicies.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the `NetworkPolicy` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "NetworkPolicy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.nodeTypes.get": + +type ProjectsLocationsNodeTypesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single `NodeType`. +// +// - name: The resource name of the node type to retrieve. Resource +// names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`. +func (r *ProjectsLocationsNodeTypesService) Get(name string) *ProjectsLocationsNodeTypesGetCall { + c := &ProjectsLocationsNodeTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + 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 *ProjectsLocationsNodeTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodeTypesGetCall { + 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 *ProjectsLocationsNodeTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNodeTypesGetCall { + 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 *ProjectsLocationsNodeTypesGetCall) Context(ctx context.Context) *ProjectsLocationsNodeTypesGetCall { + 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 *ProjectsLocationsNodeTypesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNodeTypesGetCall) 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/{+name}") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.nodeTypes.get" call. +// Exactly one of *NodeType or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *NodeType.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 *ProjectsLocationsNodeTypesGetCall) Do(opts ...googleapi.CallOption) (*NodeType, 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 := &NodeType{ + 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 details of a single `NodeType`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodeTypes/{nodeTypesId}", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.nodeTypes.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the node type to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/nodeTypes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "NodeType" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.nodeTypes.list": + +type ProjectsLocationsNodeTypesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists node types +// +// - parent: The resource name of the location to be queried for node +// types. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: `projects/my-project/locations/us-central1-a`. +func (r *ProjectsLocationsNodeTypesService) List(parent string) *ProjectsLocationsNodeTypesListCall { + c := &ProjectsLocationsNodeTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// matches resources returned in the response. The expression must +// specify the field name, a comparison operator, and the value that you +// want to use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For +// example, if you are filtering a list of node types, you can exclude +// the ones named `standard-72` by specifying `name != "standard-72". +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example: ``` (name = "standard-72") +// (virtual_cpu_count > 2) ``` By default, each expression is an `AND` +// expression. However, you can include `AND` and `OR` expressions +// explicitly. For example: ``` (name = "standard-96") AND +// (virtual_cpu_count > 2) OR (name = "standard-72") ``` +func (c *ProjectsLocationsNodeTypesListCall) Filter(filter string) *ProjectsLocationsNodeTypesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of node types to return in one page. The service may return fewer +// than this value. The maximum value is coerced to 1000. The default +// value of this field is 500. +func (c *ProjectsLocationsNodeTypesListCall) PageSize(pageSize int64) *ProjectsLocationsNodeTypesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListNodeTypes` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListNodeTypes` must match the call that provided the +// page token. +func (c *ProjectsLocationsNodeTypesListCall) PageToken(pageToken string) *ProjectsLocationsNodeTypesListCall { + c.urlParams_.Set("pageToken", pageToken) + 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 *ProjectsLocationsNodeTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodeTypesListCall { + 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 *ProjectsLocationsNodeTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNodeTypesListCall { + 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 *ProjectsLocationsNodeTypesListCall) Context(ctx context.Context) *ProjectsLocationsNodeTypesListCall { + 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 *ProjectsLocationsNodeTypesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNodeTypesListCall) 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/{+parent}/nodeTypes") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.nodeTypes.list" call. +// Exactly one of *ListNodeTypesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListNodeTypesResponse.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 *ProjectsLocationsNodeTypesListCall) Do(opts ...googleapi.CallOption) (*ListNodeTypesResponse, 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 := &ListNodeTypesResponse{ + 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": "Lists node types", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodeTypes", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.nodeTypes.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of node types, you can exclude the ones named `standard-72` by specifying `name != \"standard-72\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"standard-72\") (virtual_cpu_count \u003e 2) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"standard-96\") AND (virtual_cpu_count \u003e 2) OR (name = \"standard-72\") ```", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of node types to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListNodeTypes` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListNodeTypes` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the location to be queried for node types. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/nodeTypes", + // "response": { + // "$ref": "ListNodeTypesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsNodeTypesListCall) Pages(ctx context.Context, f func(*ListNodeTypesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "vmwareengine.projects.locations.operations.delete": + +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. +// +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + 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 *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { + 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 *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + 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 *ProjectsLocationsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsDeleteCall) 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 + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.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 *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, 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 := &Empty{ + 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": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "vmwareengine.projects.locations.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + 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 *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) 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/{+name}") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + 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 *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) 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/{+name}/operations") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.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 *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, 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 := &ListOperationsResponse{ + 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": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "vmwareengine.projects.locations.privateClouds.create": + +type ProjectsLocationsPrivateCloudsCreateCall struct { + s *Service + parent string + privatecloud *PrivateCloud + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new `PrivateCloud` resource in a given project and +// location. Private clouds of type `STANDARD` and `TIME_LIMITED` are +// zonal resources, `STRETCHED` private clouds are regional. Creating a +// private cloud also creates a management cluster +// (https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) +// for that private cloud. +// +// - parent: The resource name of the location to create the new private +// cloud in. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: `projects/my-project/locations/us-central1-a`. +func (r *ProjectsLocationsPrivateCloudsService) Create(parent string, privatecloud *PrivateCloud) *ProjectsLocationsPrivateCloudsCreateCall { + c := &ProjectsLocationsPrivateCloudsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.privatecloud = privatecloud + return c +} + +// PrivateCloudId sets the optional parameter "privateCloudId": +// Required. The user-provided identifier of the private cloud to be +// created. This identifier must be unique among each `PrivateCloud` +// within the parent and becomes the final token in the name URI. The +// identifier must meet the following requirements: * Only contains 1-63 +// alphanumeric characters and hyphens * Begins with an alphabetical +// character * Ends with a non-hyphen character * Not formatted as a +// UUID * Complies with RFC 1034 +// (https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) +func (c *ProjectsLocationsPrivateCloudsCreateCall) PrivateCloudId(privateCloudId string) *ProjectsLocationsPrivateCloudsCreateCall { + c.urlParams_.Set("privateCloudId", privateCloudId) + return c +} + +// RequestId sets the optional parameter "requestId": The request ID +// must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateCloudsCreateCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": True if you +// want the request to be validated and not executed; false otherwise. +func (c *ProjectsLocationsPrivateCloudsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsPrivateCloudsCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + 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 *ProjectsLocationsPrivateCloudsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsCreateCall { + 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 *ProjectsLocationsPrivateCloudsCreateCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsCreateCall { + 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 *ProjectsLocationsPrivateCloudsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsCreateCall) 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.privatecloud) + 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/{+parent}/privateClouds") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPrivateCloudsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new `PrivateCloud` resource in a given project and location. Private clouds of type `STANDARD` and `TIME_LIMITED` are zonal resources, `STRETCHED` private clouds are regional. Creating a private cloud also creates a [management cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) for that private cloud.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the location to create the new private cloud in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "privateCloudId": { + // "description": "Required. The user-provided identifier of the private cloud to be created. This identifier must be unique among each `PrivateCloud` within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + // "location": "query", + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. True if you want the request to be validated and not executed; false otherwise.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+parent}/privateClouds", + // "request": { + // "$ref": "PrivateCloud" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.delete": + +type ProjectsLocationsPrivateCloudsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Schedules a `PrivateCloud` resource for deletion. A +// `PrivateCloud` resource scheduled for deletion has +// `PrivateCloud.state` set to `DELETED` and `expireTime` set to the +// time when deletion is final and can no longer be reversed. The delete +// operation is marked as done as soon as the `PrivateCloud` is +// successfully scheduled for deletion (this also applies when +// `delayHours` is set to zero), and the operation is not kept in +// pending state until `PrivateCloud` is purged. `PrivateCloud` can be +// restored using `UndeletePrivateCloud` method before the `expireTime` +// elapses. When `expireTime` is reached, deletion is final and all +// private cloud resources are irreversibly removed and billing stops. +// During the final removal process, `PrivateCloud.state` is set to +// `PURGING`. `PrivateCloud` can be polled using standard `GET` method +// for the whole period of deletion and purging. It will not be returned +// only when it is completely purged. +// +// - name: The resource name of the private cloud to delete. Resource +// names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsService) Delete(name string) *ProjectsLocationsPrivateCloudsDeleteCall { + c := &ProjectsLocationsPrivateCloudsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// DelayHours sets the optional parameter "delayHours": Time delay of +// the deletion specified in hours. The default value is `3`. Specifying +// a non-zero value for this field changes the value of +// `PrivateCloud.state` to `DELETED` and sets `expire_time` to the +// planned deletion time. Deletion can be cancelled before `expire_time` +// elapses using VmwareEngine.UndeletePrivateCloud. Specifying a value +// of `0` for this field instead begins the deletion process and ceases +// billing immediately. During the final deletion process, the value of +// `PrivateCloud.state` becomes `PURGING`. +func (c *ProjectsLocationsPrivateCloudsDeleteCall) DelayHours(delayHours int64) *ProjectsLocationsPrivateCloudsDeleteCall { + c.urlParams_.Set("delayHours", fmt.Sprint(delayHours)) + return c +} + +// Force sets the optional parameter "force": If set to true, cascade +// delete is enabled and all children of this private cloud resource are +// also deleted. When this flag is set to false, the private cloud will +// not be deleted if there are any children other than the management +// cluster. The management cluster is always deleted. +func (c *ProjectsLocationsPrivateCloudsDeleteCall) Force(force bool) *ProjectsLocationsPrivateCloudsDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + +// RequestId sets the optional parameter "requestId": The request ID +// must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateCloudsDeleteCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsDeleteCall { + c.urlParams_.Set("requestId", requestId) + 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 *ProjectsLocationsPrivateCloudsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsDeleteCall { + 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 *ProjectsLocationsPrivateCloudsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsDeleteCall { + 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 *ProjectsLocationsPrivateCloudsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsDeleteCall) 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 + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPrivateCloudsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Schedules a `PrivateCloud` resource for deletion. A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` set to `DELETED` and `expireTime` set to the time when deletion is final and can no longer be reversed. The delete operation is marked as done as soon as the `PrivateCloud` is successfully scheduled for deletion (this also applies when `delayHours` is set to zero), and the operation is not kept in pending state until `PrivateCloud` is purged. `PrivateCloud` can be restored using `UndeletePrivateCloud` method before the `expireTime` elapses. When `expireTime` is reached, deletion is final and all private cloud resources are irreversibly removed and billing stops. During the final removal process, `PrivateCloud.state` is set to `PURGING`. `PrivateCloud` can be polled using standard `GET` method for the whole period of deletion and purging. It will not be returned only when it is completely purged.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}", + // "httpMethod": "DELETE", + // "id": "vmwareengine.projects.locations.privateClouds.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "delayHours": { + // "description": "Optional. Time delay of the deletion specified in hours. The default value is `3`. Specifying a non-zero value for this field changes the value of `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned deletion time. Deletion can be cancelled before `expire_time` elapses using VmwareEngine.UndeletePrivateCloud. Specifying a value of `0` for this field instead begins the deletion process and ceases billing immediately. During the final deletion process, the value of `PrivateCloud.state` becomes `PURGING`.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "force": { + // "description": "Optional. If set to true, cascade delete is enabled and all children of this private cloud resource are also deleted. When this flag is set to false, the private cloud will not be deleted if there are any children other than the management cluster. The management cluster is always deleted.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Required. The resource name of the private cloud to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.get": + +type ProjectsLocationsPrivateCloudsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a `PrivateCloud` resource by its resource name. +// +// - name: The resource name of the private cloud to retrieve. Resource +// names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsService) Get(name string) *ProjectsLocationsPrivateCloudsGetCall { + c := &ProjectsLocationsPrivateCloudsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + 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 *ProjectsLocationsPrivateCloudsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsGetCall { + 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 *ProjectsLocationsPrivateCloudsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsGetCall { + 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 *ProjectsLocationsPrivateCloudsGetCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsGetCall { + 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 *ProjectsLocationsPrivateCloudsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsGetCall) 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/{+name}") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.get" call. +// Exactly one of *PrivateCloud or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *PrivateCloud.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 *ProjectsLocationsPrivateCloudsGetCall) Do(opts ...googleapi.CallOption) (*PrivateCloud, 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 := &PrivateCloud{ + 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": "Retrieves a `PrivateCloud` resource by its resource name.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the private cloud to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "PrivateCloud" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.getIamPolicy": + +type ProjectsLocationsPrivateCloudsGetIamPolicyCall 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 *ProjectsLocationsPrivateCloudsService) GetIamPolicy(resource string) *ProjectsLocationsPrivateCloudsGetIamPolicyCall { + c := &ProjectsLocationsPrivateCloudsGetIamPolicyCall{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 *ProjectsLocationsPrivateCloudsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsPrivateCloudsGetIamPolicyCall { + 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 *ProjectsLocationsPrivateCloudsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsGetIamPolicyCall { + 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 *ProjectsLocationsPrivateCloudsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsGetIamPolicyCall { + 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 *ProjectsLocationsPrivateCloudsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsGetIamPolicyCall { + 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 *ProjectsLocationsPrivateCloudsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsGetIamPolicyCall) 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 "vmwareengine.projects.locations.privateClouds.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 *ProjectsLocationsPrivateCloudsGetIamPolicyCall) 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 resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.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": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.list": + +type ProjectsLocationsPrivateCloudsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists `PrivateCloud` resources in a given project and location. +// +// - parent: The resource name of the private cloud to be queried for +// clusters. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: `projects/my-project/locations/us-central1-a`. +func (r *ProjectsLocationsPrivateCloudsService) List(parent string) *ProjectsLocationsPrivateCloudsListCall { + c := &ProjectsLocationsPrivateCloudsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// matches resources returned in the response. The expression must +// specify the field name, a comparison operator, and the value that you +// want to use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For +// example, if you are filtering a list of private clouds, you can +// exclude the ones named `example-pc` by specifying `name != +// "example-pc". You can also filter nested fields. For example, you +// could specify `networkConfig.managementCidr = "192.168.0.0/24" to +// include private clouds only if they have a matching address in their +// network configuration. To filter on multiple expressions, provide +// each separate expression within parentheses. For example: ``` (name = +// "example-pc") (createTime > "2021-04-12T08:15:10.40Z") ``` By +// default, each expression is an `AND` expression. However, you can +// include `AND` and `OR` expressions explicitly. For example: ``` (name +// = "private-cloud-1") AND (createTime > "2021-04-12T08:15:10.40Z") OR +// (name = "private-cloud-2") ``` +func (c *ProjectsLocationsPrivateCloudsListCall) Filter(filter string) *ProjectsLocationsPrivateCloudsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, returned results are ordered by `name` +// in ascending order. You can also sort results in descending order +// based on the `name` value using `orderBy="name desc". Currently, +// only ordering by `name` is supported. +func (c *ProjectsLocationsPrivateCloudsListCall) OrderBy(orderBy string) *ProjectsLocationsPrivateCloudsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of private clouds to return in one page. The service may return fewer +// than this value. The maximum value is coerced to 1000. The default +// value of this field is 500. +func (c *ProjectsLocationsPrivateCloudsListCall) PageSize(pageSize int64) *ProjectsLocationsPrivateCloudsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListPrivateClouds` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListPrivateClouds` must match the call that provided the +// page token. +func (c *ProjectsLocationsPrivateCloudsListCall) PageToken(pageToken string) *ProjectsLocationsPrivateCloudsListCall { + c.urlParams_.Set("pageToken", pageToken) + 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 *ProjectsLocationsPrivateCloudsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsListCall { + 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 *ProjectsLocationsPrivateCloudsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsListCall { + 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 *ProjectsLocationsPrivateCloudsListCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsListCall { + 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 *ProjectsLocationsPrivateCloudsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsListCall) 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/{+parent}/privateClouds") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.list" call. +// Exactly one of *ListPrivateCloudsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListPrivateCloudsResponse.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 *ProjectsLocationsPrivateCloudsListCall) Do(opts ...googleapi.CallOption) (*ListPrivateCloudsResponse, 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 := &ListPrivateCloudsResponse{ + 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": "Lists `PrivateCloud` resources in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of private clouds, you can exclude the ones named `example-pc` by specifying `name != \"example-pc\"`. You can also filter nested fields. For example, you could specify `networkConfig.managementCidr = \"192.168.0.0/24\"` to include private clouds only if they have a matching address in their network configuration. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-pc\") (createTime \u003e \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"private-cloud-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"private-cloud-2\") ```", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of private clouds to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListPrivateClouds` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPrivateClouds` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the private cloud to be queried for clusters. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/privateClouds", + // "response": { + // "$ref": "ListPrivateCloudsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsPrivateCloudsListCall) Pages(ctx context.Context, f func(*ListPrivateCloudsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "vmwareengine.projects.locations.privateClouds.patch": + +type ProjectsLocationsPrivateCloudsPatchCall struct { + s *Service + name string + privatecloud *PrivateCloud + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Modifies a `PrivateCloud` resource. Only the following fields +// can be updated: `description`. Only fields specified in `updateMask` +// are applied. During operation processing, the resource is temporarily +// in the `ACTIVE` state before the operation fully completes. For that +// period of time, you can't update the resource. Use the operation +// status to determine when the processing fully completes. +// +// - name: Output only. The resource name of this private cloud. +// Resource names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsService) Patch(name string, privatecloud *PrivateCloud) *ProjectsLocationsPrivateCloudsPatchCall { + c := &ProjectsLocationsPrivateCloudsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.privatecloud = privatecloud + return c +} + +// RequestId sets the optional parameter "requestId": The request ID +// must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateCloudsPatchCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the +// `PrivateCloud` resource by the update. The fields specified in +// `updateMask` are relative to the resource, not the full request. A +// field will be overwritten if it is in the mask. If the user does not +// provide a mask then all fields will be overwritten. +func (c *ProjectsLocationsPrivateCloudsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsPrivateCloudsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + 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 *ProjectsLocationsPrivateCloudsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsPatchCall { + 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 *ProjectsLocationsPrivateCloudsPatchCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsPatchCall { + 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 *ProjectsLocationsPrivateCloudsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsPatchCall) 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.privatecloud) + 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/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPrivateCloudsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Modifies a `PrivateCloud` resource. Only the following fields can be updated: `description`. Only fields specified in `updateMask` are applied. During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}", + // "httpMethod": "PATCH", + // "id": "vmwareengine.projects.locations.privateClouds.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The resource name of this private cloud. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the `PrivateCloud` resource by the update. The fields specified in `updateMask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "PrivateCloud" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.resetNsxCredentials": + +type ProjectsLocationsPrivateCloudsResetNsxCredentialsCall struct { + s *Service + privateCloud string + resetnsxcredentialsrequest *ResetNsxCredentialsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ResetNsxCredentials: Resets credentials of the NSX appliance. +// +// - privateCloud: The resource name of the private cloud to reset +// credentials for. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsService) ResetNsxCredentials(privateCloud string, resetnsxcredentialsrequest *ResetNsxCredentialsRequest) *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall { + c := &ProjectsLocationsPrivateCloudsResetNsxCredentialsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.privateCloud = privateCloud + c.resetnsxcredentialsrequest = resetnsxcredentialsrequest + 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 *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall { + 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 *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall { + 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 *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall) 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.resetnsxcredentialsrequest) + 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/{+privateCloud}:resetNsxCredentials") + 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{ + "privateCloud": c.privateCloud, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.resetNsxCredentials" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPrivateCloudsResetNsxCredentialsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Resets credentials of the NSX appliance.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:resetNsxCredentials", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.resetNsxCredentials", + // "parameterOrder": [ + // "privateCloud" + // ], + // "parameters": { + // "privateCloud": { + // "description": "Required. The resource name of the private cloud to reset credentials for. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+privateCloud}:resetNsxCredentials", + // "request": { + // "$ref": "ResetNsxCredentialsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.resetVcenterCredentials": + +type ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall struct { + s *Service + privateCloud string + resetvcentercredentialsrequest *ResetVcenterCredentialsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ResetVcenterCredentials: Resets credentials of the Vcenter appliance. +// +// - privateCloud: The resource name of the private cloud to reset +// credentials for. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsService) ResetVcenterCredentials(privateCloud string, resetvcentercredentialsrequest *ResetVcenterCredentialsRequest) *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall { + c := &ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.privateCloud = privateCloud + c.resetvcentercredentialsrequest = resetvcentercredentialsrequest + 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 *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall { + 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 *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall { + 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 *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall) 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.resetvcentercredentialsrequest) + 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/{+privateCloud}:resetVcenterCredentials") + 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{ + "privateCloud": c.privateCloud, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.resetVcenterCredentials" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPrivateCloudsResetVcenterCredentialsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Resets credentials of the Vcenter appliance.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:resetVcenterCredentials", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.resetVcenterCredentials", + // "parameterOrder": [ + // "privateCloud" + // ], + // "parameters": { + // "privateCloud": { + // "description": "Required. The resource name of the private cloud to reset credentials for. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+privateCloud}:resetVcenterCredentials", + // "request": { + // "$ref": "ResetVcenterCredentialsRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.setIamPolicy": + +type ProjectsLocationsPrivateCloudsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + 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 *ProjectsLocationsPrivateCloudsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsPrivateCloudsSetIamPolicyCall { + c := &ProjectsLocationsPrivateCloudsSetIamPolicyCall{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 *ProjectsLocationsPrivateCloudsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsSetIamPolicyCall { + 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 *ProjectsLocationsPrivateCloudsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsSetIamPolicyCall { + 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 *ProjectsLocationsPrivateCloudsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsSetIamPolicyCall) 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, "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 "vmwareengine.projects.locations.privateClouds.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 *ProjectsLocationsPrivateCloudsSetIamPolicyCall) 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 the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.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/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.showNsxCredentials": + +type ProjectsLocationsPrivateCloudsShowNsxCredentialsCall struct { + s *Service + privateCloud string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ShowNsxCredentials: Gets details of credentials for NSX appliance. +// +// - privateCloud: The resource name of the private cloud to be queried +// for credentials. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsService) ShowNsxCredentials(privateCloud string) *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall { + c := &ProjectsLocationsPrivateCloudsShowNsxCredentialsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.privateCloud = privateCloud + 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 *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall { + 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 *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall { + 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 *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall { + 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 *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall) 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/{+privateCloud}:showNsxCredentials") + 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{ + "privateCloud": c.privateCloud, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.showNsxCredentials" call. +// Exactly one of *Credentials or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Credentials.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 *ProjectsLocationsPrivateCloudsShowNsxCredentialsCall) Do(opts ...googleapi.CallOption) (*Credentials, 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 := &Credentials{ + 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 details of credentials for NSX appliance.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:showNsxCredentials", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.showNsxCredentials", + // "parameterOrder": [ + // "privateCloud" + // ], + // "parameters": { + // "privateCloud": { + // "description": "Required. The resource name of the private cloud to be queried for credentials. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+privateCloud}:showNsxCredentials", + // "response": { + // "$ref": "Credentials" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.showVcenterCredentials": + +type ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall struct { + s *Service + privateCloud string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ShowVcenterCredentials: Gets details of credentials for Vcenter +// appliance. +// +// - privateCloud: The resource name of the private cloud to be queried +// for credentials. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsService) ShowVcenterCredentials(privateCloud string) *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall { + c := &ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.privateCloud = privateCloud + 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 *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall { + 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 *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall { + 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 *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall { + 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 *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall) 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/{+privateCloud}:showVcenterCredentials") + 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{ + "privateCloud": c.privateCloud, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.showVcenterCredentials" call. +// Exactly one of *Credentials or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Credentials.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 *ProjectsLocationsPrivateCloudsShowVcenterCredentialsCall) Do(opts ...googleapi.CallOption) (*Credentials, 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 := &Credentials{ + 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 details of credentials for Vcenter appliance.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:showVcenterCredentials", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.showVcenterCredentials", + // "parameterOrder": [ + // "privateCloud" + // ], + // "parameters": { + // "privateCloud": { + // "description": "Required. The resource name of the private cloud to be queried for credentials. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+privateCloud}:showVcenterCredentials", + // "response": { + // "$ref": "Credentials" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.testIamPermissions": + +type ProjectsLocationsPrivateCloudsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + 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 *ProjectsLocationsPrivateCloudsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsPrivateCloudsTestIamPermissionsCall { + c := &ProjectsLocationsPrivateCloudsTestIamPermissionsCall{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 *ProjectsLocationsPrivateCloudsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsTestIamPermissionsCall { + 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 *ProjectsLocationsPrivateCloudsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsTestIamPermissionsCall { + 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 *ProjectsLocationsPrivateCloudsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsTestIamPermissionsCall) 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, "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 "vmwareengine.projects.locations.privateClouds.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 *ProjectsLocationsPrivateCloudsTestIamPermissionsCall) 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 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/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.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/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.undelete": + +type ProjectsLocationsPrivateCloudsUndeleteCall struct { + s *Service + name string + undeleteprivatecloudrequest *UndeletePrivateCloudRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Undelete: Restores a private cloud that was previously scheduled for +// deletion by `DeletePrivateCloud`. A `PrivateCloud` resource scheduled +// for deletion has `PrivateCloud.state` set to `DELETED` and +// `PrivateCloud.expireTime` set to the time when deletion can no longer +// be reversed. +// +// - name: The resource name of the private cloud scheduled for +// deletion. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsService) Undelete(name string, undeleteprivatecloudrequest *UndeletePrivateCloudRequest) *ProjectsLocationsPrivateCloudsUndeleteCall { + c := &ProjectsLocationsPrivateCloudsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.undeleteprivatecloudrequest = undeleteprivatecloudrequest + 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 *ProjectsLocationsPrivateCloudsUndeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsUndeleteCall { + 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 *ProjectsLocationsPrivateCloudsUndeleteCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsUndeleteCall { + 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 *ProjectsLocationsPrivateCloudsUndeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsUndeleteCall) 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.undeleteprivatecloudrequest) + 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/{+name}:undelete") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.undelete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPrivateCloudsUndeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Restores a private cloud that was previously scheduled for deletion by `DeletePrivateCloud`. A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` set to `DELETED` and `PrivateCloud.expireTime` set to the time when deletion can no longer be reversed.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:undelete", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.undelete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the private cloud scheduled for deletion. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:undelete", + // "request": { + // "$ref": "UndeletePrivateCloudRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.clusters.create": + +type ProjectsLocationsPrivateCloudsClustersCreateCall struct { + s *Service + parent string + cluster *Cluster + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new cluster in a given private cloud. Creating a +// new cluster provides additional nodes for use in the parent private +// cloud and requires sufficient node quota +// (https://cloud.google.com/vmware-engine/quotas). +// +// - parent: The resource name of the private cloud to create a new +// cluster in. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsClustersService) Create(parent string, cluster *Cluster) *ProjectsLocationsPrivateCloudsClustersCreateCall { + c := &ProjectsLocationsPrivateCloudsClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.cluster = cluster + return c +} + +// ClusterId sets the optional parameter "clusterId": Required. The +// user-provided identifier of the new `Cluster`. This identifier must +// be unique among clusters within the parent and becomes the final +// token in the name URI. The identifier must meet the following +// requirements: * Only contains 1-63 alphanumeric characters and +// hyphens * Begins with an alphabetical character * Ends with a +// non-hyphen character * Not formatted as a UUID * Complies with RFC +// 1034 (https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) +func (c *ProjectsLocationsPrivateCloudsClustersCreateCall) ClusterId(clusterId string) *ProjectsLocationsPrivateCloudsClustersCreateCall { + c.urlParams_.Set("clusterId", clusterId) + return c +} + +// RequestId sets the optional parameter "requestId": The request ID +// must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateCloudsClustersCreateCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsClustersCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": True if you +// want the request to be validated and not executed; false otherwise. +func (c *ProjectsLocationsPrivateCloudsClustersCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsPrivateCloudsClustersCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + 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 *ProjectsLocationsPrivateCloudsClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersCreateCall { + 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 *ProjectsLocationsPrivateCloudsClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersCreateCall { + 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 *ProjectsLocationsPrivateCloudsClustersCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsClustersCreateCall) 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.cluster) + 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/{+parent}/clusters") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.clusters.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPrivateCloudsClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new cluster in a given private cloud. Creating a new cluster provides additional nodes for use in the parent private cloud and requires sufficient [node quota](https://cloud.google.com/vmware-engine/quotas).", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.clusters.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "clusterId": { + // "description": "Required. The user-provided identifier of the new `Cluster`. This identifier must be unique among clusters within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the private cloud to create a new cluster in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. True if you want the request to be validated and not executed; false otherwise.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+parent}/clusters", + // "request": { + // "$ref": "Cluster" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.clusters.delete": + +type ProjectsLocationsPrivateCloudsClustersDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a `Cluster` resource. To avoid unintended data loss, +// migrate or gracefully shut down any workloads running on the cluster +// before deletion. You cannot delete the management cluster of a +// private cloud using this method. +// +// - name: The resource name of the cluster to delete. Resource names +// are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ +// clusters/my-cluster`. +func (r *ProjectsLocationsPrivateCloudsClustersService) Delete(name string) *ProjectsLocationsPrivateCloudsClustersDeleteCall { + c := &ProjectsLocationsPrivateCloudsClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": The request ID +// must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateCloudsClustersDeleteCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsClustersDeleteCall { + c.urlParams_.Set("requestId", requestId) + 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 *ProjectsLocationsPrivateCloudsClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersDeleteCall { + 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 *ProjectsLocationsPrivateCloudsClustersDeleteCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersDeleteCall { + 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 *ProjectsLocationsPrivateCloudsClustersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsClustersDeleteCall) 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 + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.clusters.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPrivateCloudsClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a `Cluster` resource. To avoid unintended data loss, migrate or gracefully shut down any workloads running on the cluster before deletion. You cannot delete the management cluster of a private cloud using this method.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}", + // "httpMethod": "DELETE", + // "id": "vmwareengine.projects.locations.privateClouds.clusters.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the cluster to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.clusters.get": + +type ProjectsLocationsPrivateCloudsClustersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a `Cluster` resource by its resource name. +// +// - name: The cluster resource name to retrieve. Resource names are +// schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ +// clusters/my-cluster`. +func (r *ProjectsLocationsPrivateCloudsClustersService) Get(name string) *ProjectsLocationsPrivateCloudsClustersGetCall { + c := &ProjectsLocationsPrivateCloudsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + 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 *ProjectsLocationsPrivateCloudsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersGetCall { + 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 *ProjectsLocationsPrivateCloudsClustersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsClustersGetCall { + 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 *ProjectsLocationsPrivateCloudsClustersGetCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersGetCall { + 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 *ProjectsLocationsPrivateCloudsClustersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsClustersGetCall) 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/{+name}") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.clusters.get" call. +// Exactly one of *Cluster or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Cluster.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 *ProjectsLocationsPrivateCloudsClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, 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 := &Cluster{ + 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": "Retrieves a `Cluster` resource by its resource name.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.clusters.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The cluster resource name to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Cluster" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.clusters.getIamPolicy": + +type ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall 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 *ProjectsLocationsPrivateCloudsClustersService) GetIamPolicy(resource string) *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall { + c := &ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall{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 *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall { + 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 *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall { + 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 *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall { + 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 *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall { + 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 *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) 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 "vmwareengine.projects.locations.privateClouds.clusters.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 *ProjectsLocationsPrivateCloudsClustersGetIamPolicyCall) 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 resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.clusters.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": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.clusters.list": + +type ProjectsLocationsPrivateCloudsClustersListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists `Cluster` resources in a given private cloud. +// +// - parent: The resource name of the private cloud to query for +// clusters. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsClustersService) List(parent string) *ProjectsLocationsPrivateCloudsClustersListCall { + c := &ProjectsLocationsPrivateCloudsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (name = "example-cluster") (nodeCount = "3") ``` By +// default, each expression is an `AND` expression. However, you can +// include `AND` and `OR` expressions explicitly. For example: ``` (name +// = "example-cluster-1") AND (createTime > "2021-04-12T08:15:10.40Z") +// OR (name = "example-cluster-2") ``` +func (c *ProjectsLocationsPrivateCloudsClustersListCall) Filter(filter string) *ProjectsLocationsPrivateCloudsClustersListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, returned results are ordered by `name` +// in ascending order. You can also sort results in descending order +// based on the `name` value using `orderBy="name desc". Currently, +// only ordering by `name` is supported. +func (c *ProjectsLocationsPrivateCloudsClustersListCall) OrderBy(orderBy string) *ProjectsLocationsPrivateCloudsClustersListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of clusters to return in one page. The service may return fewer than +// this value. The maximum value is coerced to 1000. The default value +// of this field is 500. +func (c *ProjectsLocationsPrivateCloudsClustersListCall) PageSize(pageSize int64) *ProjectsLocationsPrivateCloudsClustersListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListClusters` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListClusters` must match the call that provided the page +// token. +func (c *ProjectsLocationsPrivateCloudsClustersListCall) PageToken(pageToken string) *ProjectsLocationsPrivateCloudsClustersListCall { + c.urlParams_.Set("pageToken", pageToken) + 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 *ProjectsLocationsPrivateCloudsClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersListCall { + 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 *ProjectsLocationsPrivateCloudsClustersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsClustersListCall { + 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 *ProjectsLocationsPrivateCloudsClustersListCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersListCall { + 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 *ProjectsLocationsPrivateCloudsClustersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsClustersListCall) 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/{+parent}/clusters") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.clusters.list" call. +// Exactly one of *ListClustersResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListClustersResponse.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 *ProjectsLocationsPrivateCloudsClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, 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 := &ListClustersResponse{ + 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": "Lists `Cluster` resources in a given private cloud.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.clusters.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": " To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-cluster\") (nodeCount = \"3\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-cluster-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-cluster-2\") ```", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of clusters to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListClusters` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListClusters` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the private cloud to query for clusters. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/clusters", + // "response": { + // "$ref": "ListClustersResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsPrivateCloudsClustersListCall) Pages(ctx context.Context, f func(*ListClustersResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "vmwareengine.projects.locations.privateClouds.clusters.patch": + +type ProjectsLocationsPrivateCloudsClustersPatchCall struct { + s *Service + name string + cluster *Cluster + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Modifies a `Cluster` resource. Only fields specified in +// `updateMask` are applied. During operation processing, the resource +// is temporarily in the `ACTIVE` state before the operation fully +// completes. For that period of time, you can't update the resource. +// Use the operation status to determine when the processing fully +// completes. +// +// - name: Output only. The resource name of this cluster. Resource +// names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ +// clusters/my-cluster`. +func (r *ProjectsLocationsPrivateCloudsClustersService) Patch(name string, cluster *Cluster) *ProjectsLocationsPrivateCloudsClustersPatchCall { + c := &ProjectsLocationsPrivateCloudsClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.cluster = cluster + return c +} + +// RequestId sets the optional parameter "requestId": The request ID +// must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateCloudsClustersPatchCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsClustersPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the `Cluster` +// resource by the update. The fields specified in the `updateMask` are +// relative to the resource, not the full request. A field will be +// overwritten if it is in the mask. If the user does not provide a mask +// then all fields will be overwritten. +func (c *ProjectsLocationsPrivateCloudsClustersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsPrivateCloudsClustersPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": True if you +// want the request to be validated and not executed; false otherwise. +func (c *ProjectsLocationsPrivateCloudsClustersPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsPrivateCloudsClustersPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + 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 *ProjectsLocationsPrivateCloudsClustersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersPatchCall { + 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 *ProjectsLocationsPrivateCloudsClustersPatchCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersPatchCall { + 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 *ProjectsLocationsPrivateCloudsClustersPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsClustersPatchCall) 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.cluster) + 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/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.clusters.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPrivateCloudsClustersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Modifies a `Cluster` resource. Only fields specified in `updateMask` are applied. During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}", + // "httpMethod": "PATCH", + // "id": "vmwareengine.projects.locations.privateClouds.clusters.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The resource name of this cluster. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the `Cluster` resource by the update. The fields specified in the `updateMask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. True if you want the request to be validated and not executed; false otherwise.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Cluster" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.clusters.setIamPolicy": + +type ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + 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 *ProjectsLocationsPrivateCloudsClustersService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall { + c := &ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall{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 *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall { + 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 *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall { + 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 *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall) 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, "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 "vmwareengine.projects.locations.privateClouds.clusters.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 *ProjectsLocationsPrivateCloudsClustersSetIamPolicyCall) 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 the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.clusters.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/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.clusters.testIamPermissions": + +type ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + 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 *ProjectsLocationsPrivateCloudsClustersService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall { + c := &ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall{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 *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall { + 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 *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall { + 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 *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall) 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, "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 "vmwareengine.projects.locations.privateClouds.clusters.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 *ProjectsLocationsPrivateCloudsClustersTestIamPermissionsCall) 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 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/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.clusters.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/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.create": + +type ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall struct { + s *Service + parent string + hcxactivationkey *HcxActivationKey + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new HCX activation key in a given private cloud. +// +// - parent: The resource name of the private cloud to create the key +// for. Resource names are schemeless URIs that follow the conventions +// in https://cloud.google.com/apis/design/resource_names. For +// example: +// `projects/my-project/locations/us-central1/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsHcxActivationKeysService) Create(parent string, hcxactivationkey *HcxActivationKey) *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall { + c := &ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.hcxactivationkey = hcxactivationkey + return c +} + +// HcxActivationKeyId sets the optional parameter "hcxActivationKeyId": +// Required. The user-provided identifier of the `HcxActivationKey` to +// be created. This identifier must be unique among `HcxActivationKey` +// resources within the parent and becomes the final token in the name +// URI. The identifier must meet the following requirements: * Only +// contains 1-63 alphanumeric characters and hyphens * Begins with an +// alphabetical character * Ends with a non-hyphen character * Not +// formatted as a UUID * Complies with RFC 1034 +// (https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) HcxActivationKeyId(hcxActivationKeyId string) *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall { + c.urlParams_.Set("hcxActivationKeyId", hcxActivationKeyId) + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) RequestId(requestId string) *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall { + c.urlParams_.Set("requestId", requestId) + 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall { + 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall { + 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) 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.hcxactivationkey) + 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/{+parent}/hcxActivationKeys") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new HCX activation key in a given private cloud.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "hcxActivationKeyId": { + // "description": "Required. The user-provided identifier of the `HcxActivationKey` to be created. This identifier must be unique among `HcxActivationKey` resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the private cloud to create the key for. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/hcxActivationKeys", + // "request": { + // "$ref": "HcxActivationKey" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.get": + +type ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a `HcxActivationKey` resource by its resource name. +// +// - name: The resource name of the HCX activation key to retrieve. +// Resource names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1/privateClouds/my-cloud/hc +// xActivationKeys/my-key`. +func (r *ProjectsLocationsPrivateCloudsHcxActivationKeysService) Get(name string) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall { + c := &ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall { + 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall { + 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall { + 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall) 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/{+name}") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.get" call. +// Exactly one of *HcxActivationKey or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *HcxActivationKey.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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetCall) Do(opts ...googleapi.CallOption) (*HcxActivationKey, 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 := &HcxActivationKey{ + 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": "Retrieves a `HcxActivationKey` resource by its resource name.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the HCX activation key to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "HcxActivationKey" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.getIamPolicy": + +type ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysService) GetIamPolicy(resource string) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall { + c := &ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall{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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall { + 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall { + 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall { + 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall { + 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) 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 "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.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 *ProjectsLocationsPrivateCloudsHcxActivationKeysGetIamPolicyCall) 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 resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.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": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.list": + +type ProjectsLocationsPrivateCloudsHcxActivationKeysListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists `HcxActivationKey` resources in a given private cloud. +// +// - parent: The resource name of the private cloud to be queried for +// HCX activation keys. Resource names are schemeless URIs that follow +// the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsHcxActivationKeysService) List(parent string) *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall { + c := &ProjectsLocationsPrivateCloudsHcxActivationKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of HCX activation keys to return in one page. The service may return +// fewer than this value. The maximum value is coerced to 1000. The +// default value of this field is 500. +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) PageSize(pageSize int64) *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListHcxActivationKeys` call. Provide this +// to retrieve the subsequent page. When paginating, all other +// parameters provided to `ListHcxActivationKeys` must match the call +// that provided the page token. +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) PageToken(pageToken string) *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall { + c.urlParams_.Set("pageToken", pageToken) + 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall { + 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall { + 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall { + 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) 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/{+parent}/hcxActivationKeys") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.list" call. +// Exactly one of *ListHcxActivationKeysResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListHcxActivationKeysResponse.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 *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) Do(opts ...googleapi.CallOption) (*ListHcxActivationKeysResponse, 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 := &ListHcxActivationKeysResponse{ + 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": "Lists `HcxActivationKey` resources in a given private cloud.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of HCX activation keys to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListHcxActivationKeys` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListHcxActivationKeys` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the private cloud to be queried for HCX activation keys. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/hcxActivationKeys", + // "response": { + // "$ref": "ListHcxActivationKeysResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysListCall) Pages(ctx context.Context, f func(*ListHcxActivationKeysResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.setIamPolicy": + +type ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall { + c := &ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall{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 *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall { + 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall { + 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall) 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, "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 "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.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 *ProjectsLocationsPrivateCloudsHcxActivationKeysSetIamPolicyCall) 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 the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.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/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.testIamPermissions": + +type ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall { + c := &ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall{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 *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall { + 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall { + 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 *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall) 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, "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 "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.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 *ProjectsLocationsPrivateCloudsHcxActivationKeysTestIamPermissionsCall) 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 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/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.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/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.subnets.get": + +type ProjectsLocationsPrivateCloudsSubnetsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single subnet. +// +// - name: The resource name of the subnet to retrieve. Resource names +// are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ +// subnets/my-subnet`. +func (r *ProjectsLocationsPrivateCloudsSubnetsService) Get(name string) *ProjectsLocationsPrivateCloudsSubnetsGetCall { + c := &ProjectsLocationsPrivateCloudsSubnetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + 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 *ProjectsLocationsPrivateCloudsSubnetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsSubnetsGetCall { + 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 *ProjectsLocationsPrivateCloudsSubnetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsSubnetsGetCall { + 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 *ProjectsLocationsPrivateCloudsSubnetsGetCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsSubnetsGetCall { + 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 *ProjectsLocationsPrivateCloudsSubnetsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsSubnetsGetCall) 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/{+name}") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.subnets.get" call. +// Exactly one of *Subnet or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Subnet.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 *ProjectsLocationsPrivateCloudsSubnetsGetCall) Do(opts ...googleapi.CallOption) (*Subnet, 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 := &Subnet{ + 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 details of a single subnet.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/subnets/{subnetsId}", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.subnets.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the subnet to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/subnets/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Subnet" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateClouds.subnets.list": + +type ProjectsLocationsPrivateCloudsSubnetsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists subnets in a given private cloud. +// +// - parent: The resource name of the private cloud to be queried for +// subnets. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`. +func (r *ProjectsLocationsPrivateCloudsSubnetsService) List(parent string) *ProjectsLocationsPrivateCloudsSubnetsListCall { + c := &ProjectsLocationsPrivateCloudsSubnetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of subnets to return in one page. The service may return fewer than +// this value. The maximum value is coerced to 1000. The default value +// of this field is 500. +func (c *ProjectsLocationsPrivateCloudsSubnetsListCall) PageSize(pageSize int64) *ProjectsLocationsPrivateCloudsSubnetsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListSubnetsRequest` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListSubnetsRequest` must match the call that provided +// the page token. +func (c *ProjectsLocationsPrivateCloudsSubnetsListCall) PageToken(pageToken string) *ProjectsLocationsPrivateCloudsSubnetsListCall { + c.urlParams_.Set("pageToken", pageToken) + 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 *ProjectsLocationsPrivateCloudsSubnetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsSubnetsListCall { + 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 *ProjectsLocationsPrivateCloudsSubnetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateCloudsSubnetsListCall { + 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 *ProjectsLocationsPrivateCloudsSubnetsListCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsSubnetsListCall { + 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 *ProjectsLocationsPrivateCloudsSubnetsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsSubnetsListCall) 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/{+parent}/subnets") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.subnets.list" call. +// Exactly one of *ListSubnetsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListSubnetsResponse.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 *ProjectsLocationsPrivateCloudsSubnetsListCall) Do(opts ...googleapi.CallOption) (*ListSubnetsResponse, 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 := &ListSubnetsResponse{ + 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": "Lists subnets in a given private cloud.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/subnets", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateClouds.subnets.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of subnets to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListSubnetsRequest` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSubnetsRequest` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the private cloud to be queried for subnets. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/subnets", + // "response": { + // "$ref": "ListSubnetsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsPrivateCloudsSubnetsListCall) Pages(ctx context.Context, f func(*ListSubnetsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "vmwareengine.projects.locations.privateClouds.subnets.patch": + +type ProjectsLocationsPrivateCloudsSubnetsPatchCall struct { + s *Service + name string + subnet *Subnet + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single subnet. Only fields +// specified in `update_mask` are applied. *Note*: This API is +// synchronous and always returns a successful +// `google.longrunning.Operation` (LRO). The returned LRO will only have +// `done` and `response` fields. +// +// - name: Output only. The resource name of this subnet. Resource names +// are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/ +// subnets/my-subnet`. +func (r *ProjectsLocationsPrivateCloudsSubnetsService) Patch(name string, subnet *Subnet) *ProjectsLocationsPrivateCloudsSubnetsPatchCall { + c := &ProjectsLocationsPrivateCloudsSubnetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.subnet = subnet + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the `Subnet` +// resource by the update. The fields specified in the `update_mask` are +// relative to the resource, not the full request. A field will be +// overwritten if it is in the mask. If the user does not provide a mask +// then all fields will be overwritten. +func (c *ProjectsLocationsPrivateCloudsSubnetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsPrivateCloudsSubnetsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + 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 *ProjectsLocationsPrivateCloudsSubnetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateCloudsSubnetsPatchCall { + 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 *ProjectsLocationsPrivateCloudsSubnetsPatchCall) Context(ctx context.Context) *ProjectsLocationsPrivateCloudsSubnetsPatchCall { + 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 *ProjectsLocationsPrivateCloudsSubnetsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateCloudsSubnetsPatchCall) 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.subnet) + 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/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateClouds.subnets.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPrivateCloudsSubnetsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single subnet. Only fields specified in `update_mask` are applied. *Note*: This API is synchronous and always returns a successful `google.longrunning.Operation` (LRO). The returned LRO will only have `done` and `response` fields.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/subnets/{subnetsId}", + // "httpMethod": "PATCH", + // "id": "vmwareengine.projects.locations.privateClouds.subnets.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The resource name of this subnet. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/subnets/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the `Subnet` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Subnet" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateConnections.create": + +type ProjectsLocationsPrivateConnectionsCreateCall struct { + s *Service + parent string + privateconnection *PrivateConnection + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new private connection that can be used for +// accessing private Clouds. +// +// - parent: The resource name of the location to create the new private +// connection in. Private connection is a regional resource. Resource +// names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1`. +func (r *ProjectsLocationsPrivateConnectionsService) Create(parent string, privateconnection *PrivateConnection) *ProjectsLocationsPrivateConnectionsCreateCall { + c := &ProjectsLocationsPrivateConnectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.privateconnection = privateconnection + return c +} + +// PrivateConnectionId sets the optional parameter +// "privateConnectionId": Required. The user-provided identifier of the +// new private connection. This identifier must be unique among private +// connection resources within the parent and becomes the final token in +// the name URI. The identifier must meet the following requirements: * +// Only contains 1-63 alphanumeric characters and hyphens * Begins with +// an alphabetical character * Ends with a non-hyphen character * Not +// formatted as a UUID * Complies with RFC 1034 +// (https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) +func (c *ProjectsLocationsPrivateConnectionsCreateCall) PrivateConnectionId(privateConnectionId string) *ProjectsLocationsPrivateConnectionsCreateCall { + c.urlParams_.Set("privateConnectionId", privateConnectionId) + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateConnectionsCreateCall) RequestId(requestId string) *ProjectsLocationsPrivateConnectionsCreateCall { + c.urlParams_.Set("requestId", requestId) + 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 *ProjectsLocationsPrivateConnectionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateConnectionsCreateCall { + 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 *ProjectsLocationsPrivateConnectionsCreateCall) Context(ctx context.Context) *ProjectsLocationsPrivateConnectionsCreateCall { + 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 *ProjectsLocationsPrivateConnectionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateConnectionsCreateCall) 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.privateconnection) + 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/{+parent}/privateConnections") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateConnections.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPrivateConnectionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new private connection that can be used for accessing private Clouds.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.privateConnections.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the location to create the new private connection in. Private connection is a regional resource. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "privateConnectionId": { + // "description": "Required. The user-provided identifier of the new private connection. This identifier must be unique among private connection resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + // "location": "query", + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/privateConnections", + // "request": { + // "$ref": "PrivateConnection" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateConnections.delete": + +type ProjectsLocationsPrivateConnectionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a `PrivateConnection` resource. When a private +// connection is deleted for a VMware Engine network, the connected +// network becomes inaccessible to that VMware Engine network. +// +// - name: The resource name of the private connection to be deleted. +// Resource names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1/privateConnections/my-con +// nection`. +func (r *ProjectsLocationsPrivateConnectionsService) Delete(name string) *ProjectsLocationsPrivateConnectionsDeleteCall { + c := &ProjectsLocationsPrivateConnectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateConnectionsDeleteCall) RequestId(requestId string) *ProjectsLocationsPrivateConnectionsDeleteCall { + c.urlParams_.Set("requestId", requestId) + 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 *ProjectsLocationsPrivateConnectionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateConnectionsDeleteCall { + 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 *ProjectsLocationsPrivateConnectionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPrivateConnectionsDeleteCall { + 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 *ProjectsLocationsPrivateConnectionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateConnectionsDeleteCall) 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 + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateConnections.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPrivateConnectionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a `PrivateConnection` resource. When a private connection is deleted for a VMware Engine network, the connected network becomes inaccessible to that VMware Engine network.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections/{privateConnectionsId}", + // "httpMethod": "DELETE", + // "id": "vmwareengine.projects.locations.privateConnections.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the private connection to be deleted. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateConnections/my-connection`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateConnections/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateConnections.get": + +type ProjectsLocationsPrivateConnectionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a `PrivateConnection` resource by its resource name. +// The resource contains details of the private connection, such as +// connected network, routing mode and state. +// +// - name: The resource name of the private connection to retrieve. +// Resource names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1/privateConnections/my-con +// nection`. +func (r *ProjectsLocationsPrivateConnectionsService) Get(name string) *ProjectsLocationsPrivateConnectionsGetCall { + c := &ProjectsLocationsPrivateConnectionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + 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 *ProjectsLocationsPrivateConnectionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateConnectionsGetCall { + 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 *ProjectsLocationsPrivateConnectionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateConnectionsGetCall { + 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 *ProjectsLocationsPrivateConnectionsGetCall) Context(ctx context.Context) *ProjectsLocationsPrivateConnectionsGetCall { + 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 *ProjectsLocationsPrivateConnectionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateConnectionsGetCall) 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/{+name}") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateConnections.get" call. +// Exactly one of *PrivateConnection or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *PrivateConnection.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 *ProjectsLocationsPrivateConnectionsGetCall) Do(opts ...googleapi.CallOption) (*PrivateConnection, 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 := &PrivateConnection{ + 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": "Retrieves a `PrivateConnection` resource by its resource name. The resource contains details of the private connection, such as connected network, routing mode and state.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections/{privateConnectionsId}", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateConnections.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the private connection to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateConnections/my-connection`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateConnections/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "PrivateConnection" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateConnections.list": + +type ProjectsLocationsPrivateConnectionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists `PrivateConnection` resources in a given project and +// location. +// +// - parent: The resource name of the location to query for private +// connections. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: `projects/my-project/locations/us-central1`. +func (r *ProjectsLocationsPrivateConnectionsService) List(parent string) *ProjectsLocationsPrivateConnectionsListCall { + c := &ProjectsLocationsPrivateConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// matches resources returned in the response. The expression must +// specify the field name, a comparison operator, and the value that you +// want to use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For +// example, if you are filtering a list of private connections, you can +// exclude the ones named `example-connection` by specifying `name != +// "example-connection". To filter on multiple expressions, provide +// each separate expression within parentheses. For example: ``` (name = +// "example-connection") (createTime > "2022-09-22T08:15:10.40Z") ``` By +// default, each expression is an `AND` expression. However, you can +// include `AND` and `OR` expressions explicitly. For example: ``` (name +// = "example-connection-1") AND (createTime > +// "2021-04-12T08:15:10.40Z") OR (name = "example-connection-2") ``` +func (c *ProjectsLocationsPrivateConnectionsListCall) Filter(filter string) *ProjectsLocationsPrivateConnectionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, returned results are ordered by `name` +// in ascending order. You can also sort results in descending order +// based on the `name` value using `orderBy="name desc". Currently, +// only ordering by `name` is supported. +func (c *ProjectsLocationsPrivateConnectionsListCall) OrderBy(orderBy string) *ProjectsLocationsPrivateConnectionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of private connections to return in one page. The maximum value is +// coerced to 1000. The default value of this field is 500. +func (c *ProjectsLocationsPrivateConnectionsListCall) PageSize(pageSize int64) *ProjectsLocationsPrivateConnectionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListPrivateConnections` call. Provide this +// to retrieve the subsequent page. When paginating, all other +// parameters provided to `ListPrivateConnections` must match the call +// that provided the page token. +func (c *ProjectsLocationsPrivateConnectionsListCall) PageToken(pageToken string) *ProjectsLocationsPrivateConnectionsListCall { + c.urlParams_.Set("pageToken", pageToken) + 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 *ProjectsLocationsPrivateConnectionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateConnectionsListCall { + 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 *ProjectsLocationsPrivateConnectionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateConnectionsListCall { + 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 *ProjectsLocationsPrivateConnectionsListCall) Context(ctx context.Context) *ProjectsLocationsPrivateConnectionsListCall { + 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 *ProjectsLocationsPrivateConnectionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateConnectionsListCall) 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/{+parent}/privateConnections") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateConnections.list" call. +// Exactly one of *ListPrivateConnectionsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListPrivateConnectionsResponse.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 *ProjectsLocationsPrivateConnectionsListCall) Do(opts ...googleapi.CallOption) (*ListPrivateConnectionsResponse, 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 := &ListPrivateConnectionsResponse{ + 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": "Lists `PrivateConnection` resources in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateConnections.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of private connections, you can exclude the ones named `example-connection` by specifying `name != \"example-connection\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-connection\") (createTime \u003e \"2022-09-22T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-connection-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-connection-2\") ```", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of private connections to return in one page. The maximum value is coerced to 1000. The default value of this field is 500.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListPrivateConnections` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPrivateConnections` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the location to query for private connections. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/privateConnections", + // "response": { + // "$ref": "ListPrivateConnectionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsPrivateConnectionsListCall) Pages(ctx context.Context, f func(*ListPrivateConnectionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "vmwareengine.projects.locations.privateConnections.patch": + +type ProjectsLocationsPrivateConnectionsPatchCall struct { + s *Service + name string + privateconnection *PrivateConnection + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Modifies a `PrivateConnection` resource. Only `description` +// and `routing_mode` fields can be updated. Only fields specified in +// `updateMask` are applied. +// +// - name: Output only. The resource name of the private connection. +// Resource names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-central1/privateConnections/my-con +// nection`. +func (r *ProjectsLocationsPrivateConnectionsService) Patch(name string, privateconnection *PrivateConnection) *ProjectsLocationsPrivateConnectionsPatchCall { + c := &ProjectsLocationsPrivateConnectionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.privateconnection = privateconnection + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsPrivateConnectionsPatchCall) RequestId(requestId string) *ProjectsLocationsPrivateConnectionsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the +// `PrivateConnection` resource by the update. The fields specified in +// the `update_mask` are relative to the resource, not the full request. +// A field will be overwritten if it is in the mask. If the user does +// not provide a mask then all fields will be overwritten. +func (c *ProjectsLocationsPrivateConnectionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsPrivateConnectionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + 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 *ProjectsLocationsPrivateConnectionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateConnectionsPatchCall { + 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 *ProjectsLocationsPrivateConnectionsPatchCall) Context(ctx context.Context) *ProjectsLocationsPrivateConnectionsPatchCall { + 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 *ProjectsLocationsPrivateConnectionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateConnectionsPatchCall) 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.privateconnection) + 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/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateConnections.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPrivateConnectionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Modifies a `PrivateConnection` resource. Only `description` and `routing_mode` fields can be updated. Only fields specified in `updateMask` are applied.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections/{privateConnectionsId}", + // "httpMethod": "PATCH", + // "id": "vmwareengine.projects.locations.privateConnections.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The resource name of the private connection. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateConnections/my-connection`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateConnections/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the `PrivateConnection` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "PrivateConnection" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.privateConnections.peeringRoutes.list": + +type ProjectsLocationsPrivateConnectionsPeeringRoutesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the private connection routes exchanged over a peering +// connection. +// +// - parent: The resource name of the private connection to retrieve +// peering routes from. Resource names are schemeless URIs that follow +// the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/us-west1/privateConnections/my-connec +// tion`. +func (r *ProjectsLocationsPrivateConnectionsPeeringRoutesService) List(parent string) *ProjectsLocationsPrivateConnectionsPeeringRoutesListCall { + c := &ProjectsLocationsPrivateConnectionsPeeringRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of peering routes to return in one page. The service may return fewer +// than this value. The maximum value is coerced to 1000. The default +// value of this field is 500. +func (c *ProjectsLocationsPrivateConnectionsPeeringRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsPrivateConnectionsPeeringRoutesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListPrivateConnectionPeeringRoutes` call. +// Provide this to retrieve the subsequent page. When paginating, all +// other parameters provided to `ListPrivateConnectionPeeringRoutes` +// must match the call that provided the page token. +func (c *ProjectsLocationsPrivateConnectionsPeeringRoutesListCall) PageToken(pageToken string) *ProjectsLocationsPrivateConnectionsPeeringRoutesListCall { + c.urlParams_.Set("pageToken", pageToken) + 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 *ProjectsLocationsPrivateConnectionsPeeringRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPrivateConnectionsPeeringRoutesListCall { + 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 *ProjectsLocationsPrivateConnectionsPeeringRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPrivateConnectionsPeeringRoutesListCall { + 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 *ProjectsLocationsPrivateConnectionsPeeringRoutesListCall) Context(ctx context.Context) *ProjectsLocationsPrivateConnectionsPeeringRoutesListCall { + 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 *ProjectsLocationsPrivateConnectionsPeeringRoutesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPrivateConnectionsPeeringRoutesListCall) 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/{+parent}/peeringRoutes") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.privateConnections.peeringRoutes.list" call. +// Exactly one of *ListPrivateConnectionPeeringRoutesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *ListPrivateConnectionPeeringRoutesResponse.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 *ProjectsLocationsPrivateConnectionsPeeringRoutesListCall) Do(opts ...googleapi.CallOption) (*ListPrivateConnectionPeeringRoutesResponse, 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 := &ListPrivateConnectionPeeringRoutesResponse{ + 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": "Lists the private connection routes exchanged over a peering connection.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections/{privateConnectionsId}/peeringRoutes", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.privateConnections.peeringRoutes.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of peering routes to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListPrivateConnectionPeeringRoutes` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPrivateConnectionPeeringRoutes` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the private connection to retrieve peering routes from. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-west1/privateConnections/my-connection`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/privateConnections/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/peeringRoutes", + // "response": { + // "$ref": "ListPrivateConnectionPeeringRoutesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsPrivateConnectionsPeeringRoutesListCall) Pages(ctx context.Context, f func(*ListPrivateConnectionPeeringRoutesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "vmwareengine.projects.locations.vmwareEngineNetworks.create": + +type ProjectsLocationsVmwareEngineNetworksCreateCall struct { + s *Service + parent string + vmwareenginenetwork *VmwareEngineNetwork + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new VMware Engine network that can be used by a +// private cloud. +// +// - parent: The resource name of the location to create the new VMware +// Engine network in. A VMware Engine network of type `LEGACY` is a +// regional resource, and a VMware Engine network of type `STANDARD` +// is a global resource. Resource names are schemeless URIs that +// follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/global`. +func (r *ProjectsLocationsVmwareEngineNetworksService) Create(parent string, vmwareenginenetwork *VmwareEngineNetwork) *ProjectsLocationsVmwareEngineNetworksCreateCall { + c := &ProjectsLocationsVmwareEngineNetworksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.vmwareenginenetwork = vmwareenginenetwork + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsVmwareEngineNetworksCreateCall) RequestId(requestId string) *ProjectsLocationsVmwareEngineNetworksCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// VmwareEngineNetworkId sets the optional parameter +// "vmwareEngineNetworkId": Required. The user-provided identifier of +// the new VMware Engine network. This identifier must be unique among +// VMware Engine network resources within the parent and becomes the +// final token in the name URI. The identifier must meet the following +// requirements: * For networks of type LEGACY, adheres to the format: +// `{region-id}-default`. Replace `{region-id}` with the region where +// you want to create the VMware Engine network. For example, +// "us-central1-default". * Only contains 1-63 alphanumeric characters +// and hyphens * Begins with an alphabetical character * Ends with a +// non-hyphen character * Not formatted as a UUID * Complies with RFC +// 1034 (https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) +func (c *ProjectsLocationsVmwareEngineNetworksCreateCall) VmwareEngineNetworkId(vmwareEngineNetworkId string) *ProjectsLocationsVmwareEngineNetworksCreateCall { + c.urlParams_.Set("vmwareEngineNetworkId", vmwareEngineNetworkId) + 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 *ProjectsLocationsVmwareEngineNetworksCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareEngineNetworksCreateCall { + 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 *ProjectsLocationsVmwareEngineNetworksCreateCall) Context(ctx context.Context) *ProjectsLocationsVmwareEngineNetworksCreateCall { + 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 *ProjectsLocationsVmwareEngineNetworksCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVmwareEngineNetworksCreateCall) 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.vmwareenginenetwork) + 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/{+parent}/vmwareEngineNetworks") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.vmwareEngineNetworks.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsVmwareEngineNetworksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new VMware Engine network that can be used by a private cloud.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/vmwareEngineNetworks", + // "httpMethod": "POST", + // "id": "vmwareengine.projects.locations.vmwareEngineNetworks.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the location to create the new VMware Engine network in. A VMware Engine network of type `LEGACY` is a regional resource, and a VMware Engine network of type `STANDARD` is a global resource. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "vmwareEngineNetworkId": { + // "description": "Required. The user-provided identifier of the new VMware Engine network. This identifier must be unique among VMware Engine network resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * For networks of type LEGACY, adheres to the format: `{region-id}-default`. Replace `{region-id}` with the region where you want to create the VMware Engine network. For example, \"us-central1-default\". * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/vmwareEngineNetworks", + // "request": { + // "$ref": "VmwareEngineNetwork" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.vmwareEngineNetworks.delete": + +type ProjectsLocationsVmwareEngineNetworksDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a `VmwareEngineNetwork` resource. You can only delete +// a VMware Engine network after all resources that refer to it are +// deleted. For example, a private cloud, a network peering, and a +// network policy can all refer to the same VMware Engine network. +// +// - name: The resource name of the VMware Engine network to be deleted. +// Resource names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/global/vmwareEngineNetworks/my-networ +// k`. +func (r *ProjectsLocationsVmwareEngineNetworksService) Delete(name string) *ProjectsLocationsVmwareEngineNetworksDeleteCall { + c := &ProjectsLocationsVmwareEngineNetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": Checksum used to ensure that +// the user-provided value is up to date before the server processes the +// request. The server compares provided checksum with the current +// checksum of the resource. If the user-provided value is out of date, +// this request returns an `ABORTED` error. +func (c *ProjectsLocationsVmwareEngineNetworksDeleteCall) Etag(etag string) *ProjectsLocationsVmwareEngineNetworksDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsVmwareEngineNetworksDeleteCall) RequestId(requestId string) *ProjectsLocationsVmwareEngineNetworksDeleteCall { + c.urlParams_.Set("requestId", requestId) + 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 *ProjectsLocationsVmwareEngineNetworksDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareEngineNetworksDeleteCall { + 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 *ProjectsLocationsVmwareEngineNetworksDeleteCall) Context(ctx context.Context) *ProjectsLocationsVmwareEngineNetworksDeleteCall { + 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 *ProjectsLocationsVmwareEngineNetworksDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVmwareEngineNetworksDeleteCall) 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 + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.vmwareEngineNetworks.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsVmwareEngineNetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a `VmwareEngineNetwork` resource. You can only delete a VMware Engine network after all resources that refer to it are deleted. For example, a private cloud, a network peering, and a network policy can all refer to the same VMware Engine network.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/vmwareEngineNetworks/{vmwareEngineNetworksId}", + // "httpMethod": "DELETE", + // "id": "vmwareengine.projects.locations.vmwareEngineNetworks.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "Optional. Checksum used to ensure that the user-provided value is up to date before the server processes the request. The server compares provided checksum with the current checksum of the resource. If the user-provided value is out of date, this request returns an `ABORTED` error.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. The resource name of the VMware Engine network to be deleted. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/vmwareEngineNetworks/my-network`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/vmwareEngineNetworks/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.vmwareEngineNetworks.get": + +type ProjectsLocationsVmwareEngineNetworksGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a `VmwareEngineNetwork` resource by its resource name. +// The resource contains details of the VMware Engine network, such as +// its VMware Engine network type, peered networks in a service project, +// and state (for example, `CREATING`, `ACTIVE`, `DELETING`). +// +// - name: The resource name of the VMware Engine network to retrieve. +// Resource names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/global/vmwareEngineNetworks/my-networ +// k`. +func (r *ProjectsLocationsVmwareEngineNetworksService) Get(name string) *ProjectsLocationsVmwareEngineNetworksGetCall { + c := &ProjectsLocationsVmwareEngineNetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + 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 *ProjectsLocationsVmwareEngineNetworksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareEngineNetworksGetCall { + 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 *ProjectsLocationsVmwareEngineNetworksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVmwareEngineNetworksGetCall { + 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 *ProjectsLocationsVmwareEngineNetworksGetCall) Context(ctx context.Context) *ProjectsLocationsVmwareEngineNetworksGetCall { + 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 *ProjectsLocationsVmwareEngineNetworksGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVmwareEngineNetworksGetCall) 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/{+name}") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.vmwareEngineNetworks.get" call. +// Exactly one of *VmwareEngineNetwork or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *VmwareEngineNetwork.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 *ProjectsLocationsVmwareEngineNetworksGetCall) Do(opts ...googleapi.CallOption) (*VmwareEngineNetwork, 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 := &VmwareEngineNetwork{ + 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": "Retrieves a `VmwareEngineNetwork` resource by its resource name. The resource contains details of the VMware Engine network, such as its VMware Engine network type, peered networks in a service project, and state (for example, `CREATING`, `ACTIVE`, `DELETING`).", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/vmwareEngineNetworks/{vmwareEngineNetworksId}", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.vmwareEngineNetworks.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the VMware Engine network to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/vmwareEngineNetworks/my-network`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/vmwareEngineNetworks/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "VmwareEngineNetwork" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "vmwareengine.projects.locations.vmwareEngineNetworks.list": + +type ProjectsLocationsVmwareEngineNetworksListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists `VmwareEngineNetwork` resources in a given project and +// location. +// +// - parent: The resource name of the location to query for VMware +// Engine networks. Resource names are schemeless URIs that follow the +// conventions in https://cloud.google.com/apis/design/resource_names. +// For example: `projects/my-project/locations/global`. +func (r *ProjectsLocationsVmwareEngineNetworksService) List(parent string) *ProjectsLocationsVmwareEngineNetworksListCall { + c := &ProjectsLocationsVmwareEngineNetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// matches resources returned in the response. The expression must +// specify the field name, a comparison operator, and the value that you +// want to use for filtering. The value must be a string, a number, or a +// boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For +// example, if you are filtering a list of network peerings, you can +// exclude the ones named `example-network` by specifying `name != +// "example-network". To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` (name = +// "example-network") (createTime > "2021-04-12T08:15:10.40Z") ``` By +// default, each expression is an `AND` expression. However, you can +// include `AND` and `OR` expressions explicitly. For example: ``` (name +// = "example-network-1") AND (createTime > "2021-04-12T08:15:10.40Z") +// OR (name = "example-network-2") ``` +func (c *ProjectsLocationsVmwareEngineNetworksListCall) Filter(filter string) *ProjectsLocationsVmwareEngineNetworksListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, returned results are ordered by `name` +// in ascending order. You can also sort results in descending order +// based on the `name` value using `orderBy="name desc". Currently, +// only ordering by `name` is supported. +func (c *ProjectsLocationsVmwareEngineNetworksListCall) OrderBy(orderBy string) *ProjectsLocationsVmwareEngineNetworksListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return in one page. The maximum value is coerced to +// 1000. The default value of this field is 500. +func (c *ProjectsLocationsVmwareEngineNetworksListCall) PageSize(pageSize int64) *ProjectsLocationsVmwareEngineNetworksListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListVmwareEngineNetworks` call. Provide +// this to retrieve the subsequent page. When paginating, all other +// parameters provided to `ListVmwareEngineNetworks` must match the call +// that provided the page token. +func (c *ProjectsLocationsVmwareEngineNetworksListCall) PageToken(pageToken string) *ProjectsLocationsVmwareEngineNetworksListCall { + c.urlParams_.Set("pageToken", pageToken) + 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 *ProjectsLocationsVmwareEngineNetworksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareEngineNetworksListCall { + 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 *ProjectsLocationsVmwareEngineNetworksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVmwareEngineNetworksListCall { + 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 *ProjectsLocationsVmwareEngineNetworksListCall) Context(ctx context.Context) *ProjectsLocationsVmwareEngineNetworksListCall { + 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 *ProjectsLocationsVmwareEngineNetworksListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVmwareEngineNetworksListCall) 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/{+parent}/vmwareEngineNetworks") + 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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.vmwareEngineNetworks.list" call. +// Exactly one of *ListVmwareEngineNetworksResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListVmwareEngineNetworksResponse.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 *ProjectsLocationsVmwareEngineNetworksListCall) Do(opts ...googleapi.CallOption) (*ListVmwareEngineNetworksResponse, 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 := &ListVmwareEngineNetworksResponse{ + 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": "Lists `VmwareEngineNetwork` resources in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/vmwareEngineNetworks", + // "httpMethod": "GET", + // "id": "vmwareengine.projects.locations.vmwareEngineNetworks.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `\u003e`, or `\u003c`. For example, if you are filtering a list of network peerings, you can exclude the ones named `example-network` by specifying `name != \"example-network\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-network\") (createTime \u003e \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-network-1\") AND (createTime \u003e \"2021-04-12T08:15:10.40Z\") OR (name = \"example-network-2\") ```", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return in one page. The maximum value is coerced to 1000. The default value of this field is 500.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListVmwareEngineNetworks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListVmwareEngineNetworks` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the location to query for VMware Engine networks. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/vmwareEngineNetworks", + // "response": { + // "$ref": "ListVmwareEngineNetworksResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsVmwareEngineNetworksListCall) Pages(ctx context.Context, f func(*ListVmwareEngineNetworksResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "vmwareengine.projects.locations.vmwareEngineNetworks.patch": + +type ProjectsLocationsVmwareEngineNetworksPatchCall struct { + s *Service + name string + vmwareenginenetwork *VmwareEngineNetwork + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Modifies a VMware Engine network resource. Only the following +// fields can be updated: `description`. Only fields specified in +// `updateMask` are applied. +// +// - name: Output only. The resource name of the VMware Engine network. +// Resource names are schemeless URIs that follow the conventions in +// https://cloud.google.com/apis/design/resource_names. For example: +// `projects/my-project/locations/global/vmwareEngineNetworks/my-networ +// k`. +func (r *ProjectsLocationsVmwareEngineNetworksService) Patch(name string, vmwareenginenetwork *VmwareEngineNetwork) *ProjectsLocationsVmwareEngineNetworksPatchCall { + c := &ProjectsLocationsVmwareEngineNetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.vmwareenginenetwork = vmwareenginenetwork + return c +} + +// RequestId sets the optional parameter "requestId": A request ID to +// identify requests. Specify a unique request ID so that if you must +// retry your request, the server will know to ignore the request if it +// has already been completed. The server guarantees that a request +// doesn't result in creation of duplicate commitments for at least 60 +// minutes. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with +// the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsVmwareEngineNetworksPatchCall) RequestId(requestId string) *ProjectsLocationsVmwareEngineNetworksPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the VMware +// Engine network resource by the update. The fields specified in the +// `update_mask` are relative to the resource, not the full request. A +// field will be overwritten if it is in the mask. If the user does not +// provide a mask then all fields will be overwritten. Only the +// following fields can be updated: `description`. +func (c *ProjectsLocationsVmwareEngineNetworksPatchCall) UpdateMask(updateMask string) *ProjectsLocationsVmwareEngineNetworksPatchCall { + c.urlParams_.Set("updateMask", updateMask) + 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 *ProjectsLocationsVmwareEngineNetworksPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsVmwareEngineNetworksPatchCall { + 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 *ProjectsLocationsVmwareEngineNetworksPatchCall) Context(ctx context.Context) *ProjectsLocationsVmwareEngineNetworksPatchCall { + 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 *ProjectsLocationsVmwareEngineNetworksPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVmwareEngineNetworksPatchCall) 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.vmwareenginenetwork) + 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/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "vmwareengine.projects.locations.vmwareEngineNetworks.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsVmwareEngineNetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Modifies a VMware Engine network resource. Only the following fields can be updated: `description`. Only fields specified in `updateMask` are applied.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/vmwareEngineNetworks/{vmwareEngineNetworksId}", + // "httpMethod": "PATCH", + // "id": "vmwareengine.projects.locations.vmwareEngineNetworks.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The resource name of the VMware Engine network. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/vmwareEngineNetworks/my-network`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/vmwareEngineNetworks/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the VMware Engine network resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. Only the following fields can be updated: `description`.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "VmwareEngineNetwork" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +}